Maarten Lankhorst : quartz: Pass the reference time + small delay on on begin of playback.

Alexandre Julliard julliard at winehq.org
Thu Mar 20 09:48:19 CDT 2008


Module: wine
Branch: master
Commit: d38b8502a6858e5d727385a7b06df3822c17a5dc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d38b8502a6858e5d727385a7b06df3822c17a5dc

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Wed Mar 19 17:48:38 2008 -0700

quartz: Pass the reference time + small delay on on begin of playback.

---

 dlls/quartz/filtergraph.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index d30103d..80b39bf 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -1478,7 +1478,22 @@ static HRESULT ExploreGraph(IFilterGraphImpl* pGraph, IPin* pOutputPin, fnFoundF
 }
 
 static HRESULT WINAPI SendRun(IBaseFilter *pFilter) {
-   return IBaseFilter_Run(pFilter, 0);
+    LONGLONG time = 0;
+    IReferenceClock *clock = NULL;
+
+    IBaseFilter_GetSyncSource(pFilter, &clock);
+    if (clock)
+    {
+        IReferenceClock_GetTime(clock, &time);
+        if (time)
+            /* Add 50 ms */
+            time += 500000;
+        if (time < 0)
+            time = 0;
+        IReferenceClock_Release(clock);
+    }
+
+    return IBaseFilter_Run(pFilter, time);
 }
 
 static HRESULT WINAPI SendPause(IBaseFilter *pFilter) {




More information about the wine-cvs mailing list