The attached patch attempts to fix
http://bugs.winehq.org/show_bug.cgi?id=24869 , but due to my limited
knowledge of DirectShow I'm not certain about its correctness. Can
anyone point out if there's anything wrong with it?
From fa516d2c512b3c515a465d6e6d992f3f3d722b72 Mon Sep 17 00:00:00 2001
From: Vladimir Panteleev <vladi...@thecybershadow.net>
Date: Sun, 24 Oct 2010 00:10:00 +0300
Subject: quartz: Don't block indefinitely when pausing after end of stream

---
 dlls/quartz/dsoundrender.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c
index a51da6c..5429ea7 100644
--- a/dlls/quartz/dsoundrender.c
+++ b/dlls/quartz/dsoundrender.c
@@ -605,7 +605,10 @@ static HRESULT WINAPI DSoundRender_Pause(IBaseFilter * 
iface)
             This->filter.state = State_Paused;
 
         ResetEvent(This->blocked);
-        ResetEvent(This->state_change);
+        if (This->pInputPin->end_of_stream)
+            SetEvent(This->state_change);
+        else
+            ResetEvent(This->state_change);
     }
     LeaveCriticalSection(&This->filter.csFilter);
 
-- 
1.7.1



Reply via email to