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

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

View File

@ -105,8 +105,8 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndOfStream(IPin * iface)
TRACE("(%p/%p)->()\n", This, pFilter);
EnterCriticalSection(&pFilter->filter.csFilter);
EnterCriticalSection(&pFilter->csRenderLock);
EnterCriticalSection(&pFilter->filter.csFilter);
hr = BaseInputPinImpl_EndOfStream(iface);
EnterCriticalSection(This->pin.pCritSec);
if (SUCCEEDED(hr))
@ -117,8 +117,8 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndOfStream(IPin * iface)
hr = BaseRendererImpl_EndOfStream(pFilter);
}
LeaveCriticalSection(This->pin.pCritSec);
LeaveCriticalSection(&pFilter->csRenderLock);
LeaveCriticalSection(&pFilter->filter.csFilter);
LeaveCriticalSection(&pFilter->csRenderLock);
return hr;
}