mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-16 08:56:40 -05:00
sink-input/source-output: Don't set save_volume if volume is not writable
This fixes a later assertion failure in module-stream-restore. Buglink: https://bugs.launchpad.net/bugs/896602 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
862b24c2e5
commit
c0a4f81123
2 changed files with 6 additions and 0 deletions
|
|
@ -376,6 +376,9 @@ int pa_sink_input_new(
|
||||||
data->save_volume = FALSE;
|
data->save_volume = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!data->volume_writable)
|
||||||
|
data->save_volume = false;
|
||||||
|
|
||||||
pa_return_val_if_fail(pa_cvolume_compatible(&data->volume, &data->sample_spec), -PA_ERR_INVALID);
|
pa_return_val_if_fail(pa_cvolume_compatible(&data->volume, &data->sample_spec), -PA_ERR_INVALID);
|
||||||
|
|
||||||
if (!data->muted_is_set)
|
if (!data->muted_is_set)
|
||||||
|
|
|
||||||
|
|
@ -309,6 +309,9 @@ int pa_source_output_new(
|
||||||
data->save_volume = FALSE;
|
data->save_volume = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!data->volume_writable)
|
||||||
|
data->save_volume = false;
|
||||||
|
|
||||||
pa_return_val_if_fail(pa_cvolume_compatible(&data->volume, &data->sample_spec), -PA_ERR_INVALID);
|
pa_return_val_if_fail(pa_cvolume_compatible(&data->volume, &data->sample_spec), -PA_ERR_INVALID);
|
||||||
|
|
||||||
if (!data->volume_factor_is_set)
|
if (!data->volume_factor_is_set)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue