mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 05:28:48 +00:00
pulsesink: Take a lock on the ringbuffer in acceptcaps
This is needed as a concurrent state change could pull the context or stream out from under our feet. https://bugzilla.gnome.org/show_bug.cgi?id=686459
This commit is contained in:
parent
4ef27eb0f9
commit
84238d3ea4
1 changed files with 2 additions and 0 deletions
|
@ -2026,6 +2026,7 @@ gst_pulsesink_query_acceptcaps (GstPulseSink * psink, GstCaps * caps)
|
|||
if (pbuf == NULL)
|
||||
goto done;
|
||||
|
||||
GST_OBJECT_LOCK (pbuf);
|
||||
pa_threaded_mainloop_lock (mainloop);
|
||||
|
||||
if (pbuf->context == NULL)
|
||||
|
@ -2114,6 +2115,7 @@ out:
|
|||
}
|
||||
|
||||
pa_threaded_mainloop_unlock (mainloop);
|
||||
GST_OBJECT_UNLOCK (pbuf);
|
||||
|
||||
gst_caps_replace (&spec.caps, NULL);
|
||||
gst_object_unref (pbuf);
|
||||
|
|
Loading…
Reference in a new issue