/* Move the reference point */
if( cl->b_has_reference )
{
- cl->last.i_system = ClockStreamToSystem( cl, cl->last.i_stream );
+ cl->last.i_system = ClockStreamToSystem( cl, cl->last.i_stream + AvgGet( &cl->drift ) );
cl->ref = cl->last;
}
/* Synchronized, we can wait */
if( cl->b_has_reference )
- i_wakeup = ClockStreamToSystem( cl, cl->last.i_stream );
+ i_wakeup = ClockStreamToSystem( cl, cl->last.i_stream + AvgGet( &cl->drift ) );
vlc_mutex_unlock( &cl->lock );