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

This commit is contained in:
Maarten Lankhorst 2008-03-19 17:48:38 -07:00 committed by Alexandre Julliard
parent 366eca51df
commit d38b8502a6
1 changed files with 16 additions and 1 deletions

View File

@ -1478,7 +1478,22 @@ static HRESULT ExploreGraph(IFilterGraphImpl* pGraph, IPin* pOutputPin, fnFoundF
} }
static HRESULT WINAPI SendRun(IBaseFilter *pFilter) { 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) { static HRESULT WINAPI SendPause(IBaseFilter *pFilter) {