mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
protocol-native: Fix backward compatibility break
This makes sure we don't perform a check on record stream volumes for clients that don't support them.
This commit is contained in:
parent
0f91e43d99
commit
018de50cfd
1 changed files with 6 additions and 2 deletions
|
|
@ -2243,7 +2243,7 @@ static void command_create_record_stream(pa_pdispatch *pd, uint32_t command, uin
|
||||||
peak_detect = FALSE,
|
peak_detect = FALSE,
|
||||||
early_requests = FALSE,
|
early_requests = FALSE,
|
||||||
dont_inhibit_auto_suspend = FALSE,
|
dont_inhibit_auto_suspend = FALSE,
|
||||||
volume_set = TRUE,
|
volume_set = FALSE,
|
||||||
muted_set = FALSE,
|
muted_set = FALSE,
|
||||||
fail_on_suspend = FALSE,
|
fail_on_suspend = FALSE,
|
||||||
relative_volume = FALSE,
|
relative_volume = FALSE,
|
||||||
|
|
@ -2334,6 +2334,9 @@ static void command_create_record_stream(pa_pdispatch *pd, uint32_t command, uin
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c->version >= 22) {
|
if (c->version >= 22) {
|
||||||
|
/* For newer client versions (with per-source-output volumes), we try
|
||||||
|
* to make the behaviour for playback and record streams the same. */
|
||||||
|
volume_set = TRUE;
|
||||||
|
|
||||||
if (pa_tagstruct_getu8(t, &n_formats) < 0) {
|
if (pa_tagstruct_getu8(t, &n_formats) < 0) {
|
||||||
protocol_error(c);
|
protocol_error(c);
|
||||||
|
|
@ -2368,7 +2371,8 @@ static void command_create_record_stream(pa_pdispatch *pd, uint32_t command, uin
|
||||||
|
|
||||||
if (n_formats == 0) {
|
if (n_formats == 0) {
|
||||||
CHECK_VALIDITY_GOTO(c->pstream, pa_sample_spec_valid(&ss), tag, PA_ERR_INVALID, finish);
|
CHECK_VALIDITY_GOTO(c->pstream, pa_sample_spec_valid(&ss), tag, PA_ERR_INVALID, finish);
|
||||||
CHECK_VALIDITY_GOTO(c->pstream, map.channels == ss.channels && volume.channels == ss.channels, tag, PA_ERR_INVALID, finish);
|
CHECK_VALIDITY_GOTO(c->pstream, map.channels == ss.channels, tag, PA_ERR_INVALID, finish);
|
||||||
|
CHECK_VALIDITY_GOTO(c->pstream, c->version < 22 || (volume.channels == ss.channels), tag, PA_ERR_INVALID, finish);
|
||||||
CHECK_VALIDITY_GOTO(c->pstream, pa_channel_map_valid(&map), tag, PA_ERR_INVALID, finish);
|
CHECK_VALIDITY_GOTO(c->pstream, pa_channel_map_valid(&map), tag, PA_ERR_INVALID, finish);
|
||||||
} else {
|
} else {
|
||||||
PA_IDXSET_FOREACH(format, formats, i) {
|
PA_IDXSET_FOREACH(format, formats, i) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue