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@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 5fa9d66c93..f5be9f6c10 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) return; }
- 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; gst_object_ref(pin->their_src); TRACE("Relinked\n"); - LeaveCriticalSection(&This->filter.csFilter); return; } } } init_new_decoded_pad(bin, pad, This); - LeaveCriticalSection(&This->filter.csFilter); }
static gboolean query_function(GstPad *pad, GstObject *parent, GstQuery *query)