strmbase/renderer: Remove some duplicated locks.

The pin and filter locks are always equal.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-06-20 20:13:18 -05:00 committed by Alexandre Julliard
parent 2d5c9d0666
commit 2dafbe079e
2 changed files with 0 additions and 8 deletions

View File

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

View File

@ -97,7 +97,6 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndOfStream(IPin * iface)
EnterCriticalSection(&pFilter->csRenderLock);
EnterCriticalSection(&pFilter->filter.csFilter);
hr = BaseInputPinImpl_EndOfStream(iface);
EnterCriticalSection(This->pin.pCritSec);
if (SUCCEEDED(hr))
{
if (pFilter->pFuncsTable->pfnEndOfStream)
@ -105,7 +104,6 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndOfStream(IPin * iface)
else
hr = BaseRendererImpl_EndOfStream(pFilter);
}
LeaveCriticalSection(This->pin.pCritSec);
LeaveCriticalSection(&pFilter->filter.csFilter);
LeaveCriticalSection(&pFilter->csRenderLock);
return hr;
@ -121,7 +119,6 @@ static HRESULT WINAPI BaseRenderer_InputPin_BeginFlush(IPin * iface)
EnterCriticalSection(&pFilter->csRenderLock);
EnterCriticalSection(&pFilter->filter.csFilter);
EnterCriticalSection(This->pin.pCritSec);
hr = BaseInputPinImpl_BeginFlush(iface);
if (SUCCEEDED(hr))
{
@ -130,7 +127,6 @@ static HRESULT WINAPI BaseRenderer_InputPin_BeginFlush(IPin * iface)
else
hr = BaseRendererImpl_BeginFlush(pFilter);
}
LeaveCriticalSection(This->pin.pCritSec);
LeaveCriticalSection(&pFilter->filter.csFilter);
LeaveCriticalSection(&pFilter->csRenderLock);
return hr;
@ -146,7 +142,6 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface)
EnterCriticalSection(&pFilter->csRenderLock);
EnterCriticalSection(&pFilter->filter.csFilter);
EnterCriticalSection(This->pin.pCritSec);
hr = BaseInputPinImpl_EndFlush(iface);
if (SUCCEEDED(hr))
{
@ -155,7 +150,6 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface)
else
hr = BaseRendererImpl_EndFlush(pFilter);
}
LeaveCriticalSection(This->pin.pCritSec);
LeaveCriticalSection(&pFilter->filter.csFilter);
LeaveCriticalSection(&pFilter->csRenderLock);
return hr;