[PATCH 5/6] winegstreamer: Don't hold the filter lock from the pad-added callback.

Zebediah Figura z.figura12 at gmail.com
Sat Nov 30 19:48:35 CST 2019

This may be called from the streaming thread, so it's not safe to do so.

Nor does it seem necessary. We expect that no streaming thread should ever
call methods on our pad or pin, and as long as we hold the filter lock and
wait for the no-more-pads signal when connecting or starting the stream, we
cannot race with application threads.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
 dlls/winegstreamer/gstdemux.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index dc8db85b72..0f53efc6eb 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -971,7 +971,6 @@ static void existing_new_pad(GstElement *bin, GstPad *pad, gpointer user)
-    EnterCriticalSection(&This->filter.csFilter);
     for (x = 0; x < This->cStreams; ++x) {
         struct gstdemux_source *pin = This->ppPins[x];
         if (!pin->their_src) {
@@ -986,13 +985,11 @@ static void existing_new_pad(GstElement *bin, GstPad *pad, gpointer user)
                 pin->their_src = pad;
-                LeaveCriticalSection(&This->filter.csFilter);
     init_new_decoded_pad(bin, pad, This);
-    LeaveCriticalSection(&This->filter.csFilter);
 static gboolean query_function(GstPad *pad, GstObject *parent, GstQuery *query)

More information about the wine-devel mailing list