Zebediah Figura : strmbase/renderer: Remove some duplicated locks.

Alexandre Julliard julliard at winehq.org
Fri Jun 21 16:44:16 CDT 2019


Module: wine
Branch: master
Commit: 2dafbe079e069e45abf94de3632e344aa1921983
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2dafbe079e069e45abf94de3632e344aa1921983

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Jun 20 20:13:18 2019 -0500

strmbase/renderer: Remove some duplicated locks.

The pin and filter locks are always equal.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 e4b50e2..21e56b4 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 b216166..38e1b6c 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;




More information about the wine-cvs mailing list