Commit 6072c66c authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase/renderer: Exit BaseRendererImpl_Receive() immediately if flush_event was signaled.

parent 608acdc8
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment