Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/strmbase/renderer.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 0c33b5ea84..aa134ba5da 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -394,15 +394,22 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa if (now - This->stream_start - start <= -10000) { HANDLE handles[2] = {This->advise_event, This->flush_event}; + DWORD ret;
IReferenceClock_AdviseTime(This->filter.pClock, This->stream_start, start, (HEVENT)This->advise_event, &cookie);
LeaveCriticalSection(&This->csRenderLock);
- WaitForMultipleObjects(2, handles, FALSE, INFINITE); + ret = WaitForMultipleObjects(2, handles, FALSE, INFINITE); IReferenceClock_Unadvise(This->filter.pClock, cookie);
+ if (ret == 1) + { + TRACE("Flush signaled, discarding current sample.\n"); + return S_OK; + } + EnterCriticalSection(&This->csRenderLock); } }