quartz: Fix race condition on EndFlush between csRenderLock and filter.csFilter.

This commit is contained in:
Erich E. Hoover 2014-07-17 10:31:17 -06:00 committed by Alexandre Julliard
parent 126a420c56
commit ee94725c8e

View File

@ -374,11 +374,11 @@ static HRESULT WINAPI VideoRenderer_EndFlush(BaseRenderer* iface)
if (This->renderer.pMediaSample) {
ResetEvent(This->hEvent);
LeaveCriticalSection(iface->pInputPin->pin.pCritSec);
LeaveCriticalSection(&iface->csRenderLock);
LeaveCriticalSection(&iface->filter.csFilter);
LeaveCriticalSection(&iface->csRenderLock);
WaitForSingleObject(This->hEvent, INFINITE);
EnterCriticalSection(&iface->filter.csFilter);
EnterCriticalSection(&iface->csRenderLock);
EnterCriticalSection(&iface->filter.csFilter);
EnterCriticalSection(iface->pInputPin->pin.pCritSec);
}
if (This->renderer.filter.state == State_Paused) {