[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] ladspa-sink: do not call pa_sink_suspend if PA_SINK_IS_LINKED is false

PulseAudio Marge Bot gitlab at gitlab.freedesktop.org
Mon Jan 4 12:31:05 UTC 2021



PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio


Commits:
b76d835e by Igor V. Kovalenko at 2021-01-04T12:19:07+00:00
ladspa-sink: do not call pa_sink_suspend if PA_SINK_IS_LINKED is false

While module-ladspa-sink is still being loaded and before pa_sink_put() is
called there may be an attempt to reconfigure master sink when avoid-resampling
is true. This breaks attempting to suspend ladspa-sink which is still in INIT
state.

Fix this by skipping pa_sink_suspend if PA_SINK_IS_LINKED is false.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/445>

- - - - -


1 changed file:

- src/modules/module-ladspa-sink.c


Changes:

=====================================
src/modules/module-ladspa-sink.c
=====================================
@@ -714,6 +714,9 @@ static void sink_input_suspend_cb(pa_sink_input *i, pa_sink_state_t old_state, p
     pa_sink_input_assert_ref(i);
     pa_assert_se(u = i->userdata);
 
+    if (!PA_SINK_IS_LINKED(u->sink->state))
+        return;
+
     if (i->sink->state != PA_SINK_SUSPENDED || i->sink->suspend_cause == PA_SUSPEND_IDLE)
         pa_sink_suspend(u->sink, false, PA_SUSPEND_UNAVAILABLE);
     else



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/b76d835e590b8aa10d724c857ea7d135ba53d94e

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/b76d835e590b8aa10d724c857ea7d135ba53d94e
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20210104/2608264a/attachment.htm>


More information about the pulseaudio-commits mailing list