quartz: Reset EcCompleteCount before starting filters.
authorMaarten Lankhorst <m.b.lankhorst@gmail.com>
Fri, 4 Apr 2008 22:54:56 +0000 (15:54 -0700)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 7 Apr 2008 09:35:29 +0000 (11:35 +0200)
This sends EC_COMPLETE notifications to the application after a graph has
finished running for the second time.

dlls/quartz/filtergraph.c

index 7c0055224a58a8edbe3145fa7dcfc717bf43eff7..1c0acc743fe3b6df9cd6195edd63da3df8a124ab 100644 (file)
@@ -1570,6 +1570,9 @@ static HRESULT WINAPI MediaControl_Run(IMediaControl *iface) {
     if (This->state == State_Running) return S_OK;
 
     EnterCriticalSection(&This->cs);
+    if (This->state == State_Stopped)
+        This->EcCompleteCount = 0;
+
     if (This->refClock)
     {
         IReferenceClock_GetTime(This->refClock, &This->start_time);
@@ -1590,6 +1593,9 @@ static HRESULT WINAPI MediaControl_Pause(IMediaControl *iface) {
     if (This->state == State_Paused) return S_OK;
 
     EnterCriticalSection(&This->cs);
+    if (This->state == State_Stopped)
+        This->EcCompleteCount = 0;
+
     if (This->state == State_Running && This->refClock)
     {
         LONGLONG time = This->start_time;