quartz: Pass the reference time + small delay on on begin of playback.
This commit is contained in:
parent
366eca51df
commit
d38b8502a6
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue