Fix the unlock order in one of the strmbase/quartz race condition patches.

This commit is contained in:
Erich E. Hoover 2014-07-31 06:51:27 -06:00
parent 92ab0e4143
commit f9cb758cdc

View File

@ -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" <erich.e.hoover@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(-)
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);