From 078ac0f764e7a8b0a592595f25a5d53a447d64bc Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Tue, 3 Dec 2019 10:14:51 -0600 Subject: [PATCH] winegstreamer: Also wait for the no-more-pads signal when pausing the filter. Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/winegstreamer/gstdemux.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 623974642d2..b44ef2b63bb 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1416,8 +1416,17 @@ static HRESULT WINAPI GST_Run(IBaseFilter *iface, REFERENCE_TIME tStart) } EnterCriticalSection(&This->filter.csFilter); + + if (This->no_more_pads_event) + ResetEvent(This->no_more_pads_event); + gst_element_set_state(This->container, GST_STATE_PLAYING); + /* Make sure that all of our pads are connected before returning, lest we + * e.g. try to seek and fail. */ + if (This->no_more_pads_event) + WaitForSingleObject(This->no_more_pads_event, INFINITE); + for (i = 0; i < This->cStreams; i++) { hr = BaseOutputPinImpl_Active(&This->ppPins[i]->pin); if (SUCCEEDED(hr)) {