diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c index 1d1f5ee7681e15065f02dd5dc1a237d353d88cd7..45a06dbc9216b08d78ad8e8ec577b4e5b684540e 100644 --- a/modules/audio_output/pulse.c +++ b/modules/audio_output/pulse.c @@ -281,11 +281,14 @@ static int VolumeSet(aout_instance_t *aout, audio_volume_t vol) pa_threaded_mainloop_lock(mainloop); op = pa_context_set_sink_input_volume(sys->context, idx, &cvolume, NULL, NULL); + if (likely(op != NULL)) + pa_operation_unref(op); + op = pa_context_set_sink_input_mute(sys->context, idx, volume == PA_VOLUME_MUTED, + NULL, NULL); + if (likely(op != NULL)) + pa_operation_unref(op); pa_threaded_mainloop_unlock(mainloop); - if (unlikely(op == NULL)) - return -1; - pa_operation_unref(op); return 0; }