[PATCH 3/5] strmbase/renderer: Remove some duplicated locks.
Zebediah Figura
z.figura12 at gmail.com
Thu Jun 20 20:13:18 CDT 2019
The pin and filter locks are always equal.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/quartz/videorenderer.c | 2 --
dlls/strmbase/renderer.c | 6 ------
2 files changed, 8 deletions(-)
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c
index e4b50e28fa0..21e56b42b26 100644
--- a/dlls/quartz/videorenderer.c
+++ b/dlls/quartz/videorenderer.c
@@ -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);
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c
index b216166d716..38e1b6c0adb 100644
--- a/dlls/strmbase/renderer.c
+++ b/dlls/strmbase/renderer.c
@@ -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;
--
2.21.0
More information about the wine-devel
mailing list