strmbase: Fix race condition on InputPin_EndFlush between csRenderLock and filter.csFilter.

This commit is contained in:
Erich E. Hoover 2014-07-17 10:35:43 -06:00 committed by Alexandre Julliard
parent c22547792a
commit 47425a5801
1 changed files with 2 additions and 2 deletions

View File

@ -155,8 +155,8 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface)
TRACE("(%p/%p)->()\n", This, pFilter);
EnterCriticalSection(&pFilter->filter.csFilter);
EnterCriticalSection(&pFilter->csRenderLock);
EnterCriticalSection(&pFilter->filter.csFilter);
EnterCriticalSection(This->pin.pCritSec);
hr = BaseInputPinImpl_EndFlush(iface);
if (SUCCEEDED(hr))
@ -167,8 +167,8 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface)
hr = BaseRendererImpl_EndFlush(pFilter);
}
LeaveCriticalSection(This->pin.pCritSec);
LeaveCriticalSection(&pFilter->csRenderLock);
LeaveCriticalSection(&pFilter->filter.csFilter);
LeaveCriticalSection(&pFilter->csRenderLock);
return hr;
}