quartz: Accept tiny discontinuities in video renderer without printing out an error.
authorMaarten Lankhorst <m.b.lankhorst@gmail.com>
Fri, 21 May 2010 19:30:55 +0000 (21:30 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 28 Jul 2010 11:32:33 +0000 (13:32 +0200)
dlls/quartz/videorenderer.c

index 268373f188858944ff2c7d53ef686ba32b42922d..0af8cc6a75db3671b8102dfe5bb71afae8ae9a21 100644 (file)
@@ -367,9 +367,12 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample)
     if (FAILED(hr))
         ERR("Cannot get sample time (%x)\n", hr);
 
-    if (This->rtLastStop != tStart)
+    if (This->rtLastStop != tStart && This->state == State_Running)
     {
-        if (IMediaSample_IsDiscontinuity(pSample) == S_FALSE)
+        LONG64 delta;
+        delta = tStart - This->rtLastStop;
+        if ((delta < -100000 || delta > 100000) &&
+            IMediaSample_IsDiscontinuity(pSample) == S_FALSE)
             ERR("Unexpected discontinuity: Last: %u.%03u, tStart: %u.%03u\n",
                 (DWORD)(This->rtLastStop / 10000000),
                 (DWORD)((This->rtLastStop / 10000)%1000),