From 096da45036959e57ae3aa5b0de0c06f69c651788 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Thu, 11 Nov 2010 23:22:59 +0100 Subject: [PATCH] winegstreamer: Fix deadlock when changing state. Leaving the lock is legal and required here since gstreamer has its own locking in place. gst_pad_push could otherwise deadlock. --- dlls/winegstreamer/gsttffilter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/winegstreamer/gsttffilter.c b/dlls/winegstreamer/gsttffilter.c index a304cc142a4..912439ebe88 100644 --- a/dlls/winegstreamer/gsttffilter.c +++ b/dlls/winegstreamer/gsttffilter.c @@ -267,7 +267,9 @@ static HRESULT WINAPI Gstreamer_transform_ProcessEnd(TransformFilter *iface) { GstTfImpl *This = (GstTfImpl*)iface; int ret; + LeaveCriticalSection(&This->tf.filter.csFilter); ret = gst_element_set_state(This->filter, GST_STATE_READY); + EnterCriticalSection(&This->tf.filter.csFilter); TRACE("Returned: %i\n", ret); return S_OK; }