Re: [PATCH 5/6] quartz: Fix race condition on EndFlush between csRenderLock and filter.csFilter.
On 07/31/2014 03:48 AM, Erich E. Hoover wrote:
From b67543fba9b2af87654533831aee2c4dae43571a Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" <erich.e.hoover(a)gmail.com> Date: Thu, 17 Jul 2014 10:31:17 -0600 Subject: quartz: Fix race condition on EndFlush between csRenderLock and filter.csFilter.
--- dlls/quartz/videorenderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 4e8f359..5fe0aea 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -377,8 +377,8 @@ static HRESULT WINAPI VideoRenderer_EndFlush(BaseRenderer* iface) LeaveCriticalSection(&iface->csRenderLock); LeaveCriticalSection(&iface->filter.csFilter); Eric, shouldn't you release the inner lock first?
WaitForSingleObject(This->hEvent, INFINITE); - EnterCriticalSection(&iface->filter.csFilter); EnterCriticalSection(&iface->csRenderLock); + EnterCriticalSection(&iface->filter.csFilter); EnterCriticalSection(iface->pInputPin->pin.pCritSec); } if (This->renderer.filter.state == State_Paused) {
bye michael
On Thu, Jul 31, 2014 at 5:51 AM, Michael Stefaniuc <mstefani(a)redhat.com> wrote:
On 07/31/2014 03:48 AM, Erich E. Hoover wrote:
... LeaveCriticalSection(&iface->csRenderLock); LeaveCriticalSection(&iface->filter.csFilter); Eric, shouldn't you release the inner lock first?
Absolutely, I caught that in patch 3 - can't believe I missed that one, good catch! Best, Erich
participants (2)
-
Erich E. Hoover -
Michael Stefaniuc