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>
This commit is contained in:
Zebediah Figura 2019-12-03 10:14:51 -06:00 committed by Alexandre Julliard
parent 7a0d963df3
commit 078ac0f764
1 changed files with 9 additions and 0 deletions

View File

@ -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)) {