[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    RFC: quartz: Don't block indefinitely when pausing after end of stream
From:       Vladimir Panteleev <thecybershadow () gmail ! com>
Date:       2010-10-31 6:52:14
Message-ID: 17810273856.20101031085214 () gmail ! com
[Download RAW message or body]

The attached patch attempts to fix
http://bugs.winehq.org/show_bug.cgi?id=3D24869 , 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?
["0001-quartz-Don-t-block-indefinitely-when-pausing-after-end.txt" (text/plain)]

From fa516d2c512b3c515a465d6e6d992f3f3d722b72 Mon Sep 17 00:00:00 2001
From: Vladimir Panteleev <vladimir@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





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic