[FFmpeg-devel] libavdevice: PTS stability and risks of drift

Olivier Galibert galibert
Mon Feb 2 17:07:41 CET 2009

On Mon, Feb 02, 2009 at 04:56:19PM +0100, Luca Abeni wrote:
> Hi Michael,
> Michael Niedermayer wrote:
> [...]
> >> I do not know what to say about the "gettimeofday() vs monotonic clock" issue,
> >> since I do not know NTP too much (can it really cause such large "jumps" in the
> >> system time?).
> > 
> > yes, if your time is off by an hour, it can change it by an hour
> Of course ;-)
> My question was more if NTP allows the host time to diverge so much from
> the reference... As I said, I do not know much about NTP, but I'd naively
> expect that it corrects the time often enough, so only small adjustments
> are needed... But maybe I am expecting too much from it.

Depends on how it's used.  If, as Michael says, you only do a ntpdate
from time to time, you're going to have large-ish jumps.  If otoh you
leave the ntp deamon running, the difference with the reference will
be sub-millisecond in my experience, and the kernel smoothes the
changes too to ensure monotonicity.


More information about the ffmpeg-devel mailing list