[vlc-devel] vlm scheduling bug

Alex Antropoff alant at transtelecom.md
Sun Sep 9 20:37:42 CEST 2007


Hello, 
Scheduling loop compare date of event using vlm_Date(), which use mtime().
On linux 2.6.x mtime call clock_gettime( CLOCK_MONOTONIC, &ts ), but
monotonic clock != real clock, for example:

clock_gettime( CLOCK_MONOTONIC, &ts );
clock_gettime( CLOCK_REALTIME, &ts1 );
printf("CLOCK_MONOTONIC: (%ld,%ld), CLOCK_REALTIME: (%ld,%ld)\n",ts.tv_sec,ts.tv_nsec,ts1.tv_sec,ts1.tv_nsec);

CLOCK_MONOTONIC: (1490398,330415929), CLOCK_REALTIME: (1189362900,693446000)

So, scheduling run events too late.
To fix it, we need to call clock_gettime( CLOCK_REALTIME, &ts);
Please, fix this.

-- 
Regards, 
Alex Antropoff



More information about the vlc-devel mailing list