[PATCH] quartz: Handle state changes in direct sound renderer correctly

Maarten Lankhorst m.b.lankhorst at gmail.com
Thu Nov 11 09:01:36 CST 2010


Based on a patch from Vladimir Panteleev
---
 dlls/quartz/dsoundrender.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c
index ca58b98..759ba07 100644
--- a/dlls/quartz/dsoundrender.c
+++ b/dlls/quartz/dsoundrender.c
@@ -620,6 +620,7 @@ static HRESULT WINAPI DSoundRender_Pause(IBaseFilter * iface)
         if (This->filter.state == State_Stopped)
         {
             This->pInputPin->end_of_stream = 0;
+            ResetEvent(This->state_change);
         }
 
         hr = IDirectSoundBuffer_Stop(This->dsbuffer);
@@ -627,7 +628,6 @@ static HRESULT WINAPI DSoundRender_Pause(IBaseFilter * iface)
             This->filter.state = State_Paused;
 
         ResetEvent(This->blocked);
-        ResetEvent(This->state_change);
     }
     LeaveCriticalSection(&This->filter.csFilter);
 
@@ -856,6 +856,7 @@ static HRESULT WINAPI DSoundRender_InputPin_EndOfStream(IPin * iface)
         }
     }
     MediaSeekingPassThru_EOS(me->seekthru_unk);
+    SetEvent(me->state_change);
     LeaveCriticalSection(This->pin.pCritSec);
 
     return hr;
-- 
1.7.1




More information about the wine-patches mailing list