quartz: Make sure at least 1 sample is processed before returning.
authorMaarten Lankhorst <m.b.lankhorst@gmail.com>
Wed, 16 Apr 2008 21:26:15 +0000 (14:26 -0700)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 17 Apr 2008 09:42:24 +0000 (11:42 +0200)
dlls/quartz/pin.c

index 71f33ec574160492f3ebebb7b803b08b60c43bdf..0c333f7c128a8367179172da00ea64ca1aee90fd 100644 (file)
@@ -1382,7 +1382,11 @@ static void CALLBACK PullPin_Thread_Process(ULONG_PTR iface)
 
     TRACE("Start\n");
 
-    while (This->rtCurrent < This->rtStop && hr == S_OK && !This->stop_playback)
+    if (This->rtCurrent >= This->rtStop)
+    {
+        FIXME("Send an EndOfStream?\n");
+    }
+    else do
     {
         /* FIXME: to improve performance by quite a bit this should be changed
          * so that one sample is processed while one sample is fetched. However,
@@ -1427,7 +1431,7 @@ static void CALLBACK PullPin_Thread_Process(ULONG_PTR iface)
 
         if (pSample)
             IMediaSample_Release(pSample);
-    }
+    } while (This->rtCurrent < This->rtStop && hr == S_OK && !This->stop_playback);
 
     CoUninitialize();
     EnterCriticalSection(This->pin.pCritSec);