strmbase: Use advise functions in WaitFor.

This commit is contained in:
Maarten Lankhorst 2010-12-06 14:16:44 +01:00 committed by Alexandre Julliard
parent feb716b423
commit 3f9abe2c28
1 changed files with 3 additions and 10 deletions

View File

@ -148,18 +148,11 @@ HRESULT QualityControlRender_WaitFor(QualityControlImpl *This, IMediaSample *sam
now -= This->clockstart;
jitter = now - start;
#if 0
/* AdviseTime is bugged, so don't use it at all */
if (jitter < -200000) {
if (jitter <= -10000) {
DWORD_PTR cookie;
IReferenceClock_AdviseTime(This->clock, clockstart, start, ev, &cookie);
IReferenceClock_AdviseTime(This->clock, This->clockstart, start, (HEVENT)ev, &cookie);
WaitForSingleObject(ev, INFINITE);
IReferenceClock_Unadvise(This->clock, cookie);
} else
#endif
if (jitter < -10000) {
TRACE("Sleeping for %i ms\n", (int)-jitter/10000);
WaitForSingleObject(ev, -jitter/10000);
IReferenceClock_Unadvise(This->clock, cookie);
}
}
else