Module: wine Branch: master Commit: 078ac0f764e7a8b0a592595f25a5d53a447d64bc URL: https://source.winehq.org/git/wine.git/?a=commit;h=078ac0f764e7a8b0a592595f2...
Author: Zebediah Figura z.figura12@gmail.com Date: Tue Dec 3 10:14:51 2019 -0600
winegstreamer: Also wait for the no-more-pads signal when pausing the filter.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winegstreamer/gstdemux.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 623974642d..b44ef2b63b 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)) {