mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
protocol-native: Fix a crash
Without this check pa_source_output_set_volume() crashes if so->volume_writable is false. The same check already exists for sink inputs. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=74529
This commit is contained in:
parent
a64eead876
commit
7297feb50b
1 changed files with 1 additions and 0 deletions
|
|
@ -3785,6 +3785,7 @@ static void command_set_volume(
|
||||||
pa_strnull(pa_proplist_gets(si->proplist, PA_PROP_MEDIA_NAME)));
|
pa_strnull(pa_proplist_gets(si->proplist, PA_PROP_MEDIA_NAME)));
|
||||||
pa_sink_input_set_volume(si, &volume, true, true);
|
pa_sink_input_set_volume(si, &volume, true, true);
|
||||||
} else if (so) {
|
} else if (so) {
|
||||||
|
CHECK_VALIDITY(c->pstream, so->volume_writable, tag, PA_ERR_BADSTATE);
|
||||||
CHECK_VALIDITY(c->pstream, volume.channels == 1 || pa_cvolume_compatible(&volume, &so->sample_spec), tag, PA_ERR_INVALID);
|
CHECK_VALIDITY(c->pstream, volume.channels == 1 || pa_cvolume_compatible(&volume, &so->sample_spec), tag, PA_ERR_INVALID);
|
||||||
|
|
||||||
pa_log_debug("Client %s changes volume of source output %s.",
|
pa_log_debug("Client %s changes volume of source output %s.",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue