From f9cb758cdccab8be6bafcc9d743cb2eef4f49de2 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Thu, 31 Jul 2014 06:51:27 -0600 Subject: [PATCH] Fix the unlock order in one of the strmbase/quartz race condition patches. --- ...ce-condition-on-EndFlush-between-csRend.patch | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/patches/strmbase-Lock_Race_Conditions/0005-quartz-Fix-race-condition-on-EndFlush-between-csRend.patch b/patches/strmbase-Lock_Race_Conditions/0005-quartz-Fix-race-condition-on-EndFlush-between-csRend.patch index 949f52e4..4d19efb3 100644 --- a/patches/strmbase-Lock_Race_Conditions/0005-quartz-Fix-race-condition-on-EndFlush-between-csRend.patch +++ b/patches/strmbase-Lock_Race_Conditions/0005-quartz-Fix-race-condition-on-EndFlush-between-csRend.patch @@ -1,20 +1,24 @@ -From 90faffc9d768d674eb603dabe72b107444e19712 Mon Sep 17 00:00:00 2001 +From 9315e5c91356306f823cbcde26ed1a4e176fed90 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" 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(-) + dlls/quartz/videorenderer.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c -index 4e8f359..5fe0aea 100644 +index 4e8f359..571a19d 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); +@@ -374,11 +374,11 @@ static HRESULT WINAPI VideoRenderer_EndFlush(BaseRenderer* iface) + if (This->renderer.pMediaSample) { + ResetEvent(This->hEvent); + LeaveCriticalSection(iface->pInputPin->pin.pCritSec); +- LeaveCriticalSection(&iface->csRenderLock); LeaveCriticalSection(&iface->filter.csFilter); ++ LeaveCriticalSection(&iface->csRenderLock); WaitForSingleObject(This->hEvent, INFINITE); - EnterCriticalSection(&iface->filter.csFilter); EnterCriticalSection(&iface->csRenderLock);