From 455d4c394a7caeee1ab0e62f305dfa98128c8762 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Wed, 19 Mar 2008 17:48:38 -0700 Subject: [PATCH] quartz: Send the reference time + small delay to each filter when run begins --- 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) { -- 1.5.4.1