[MPlayer-dev-eng] [PATCH] stream aided seeking (d d precise seeking)
Trent Piepho
xyzzy at speakeasy.org
Sun Nov 12 02:04:54 CET 2006
On Wed, 8 Nov 2006, Uoti Urpala wrote:
> On Tue, 2006-11-07 at 18:15 -0800, Trent Piepho wrote:
> > Wouldn't it be safer to use doubles for the pts values instead of floats?
>
> Yes it generally would. This has been discussed already.
I saw the message that it had been changed to use doubles after I
wrote mine.
>
> > Add a frame time to it multiple times, and you don't get the correct
> > result. Here's an example using floats:
>
> pts values aren't usually calculated by successively adding the duration
> of one frame. The problems are somewhat more subtle than that.
Not usually. There was patch for the ms-dvr demuxer that calculated PTS
values this way.
The problem that does happen is excessive jitter in the PTS values. For
example, the ts demuxer only uses floats. If you look at the jitter in the
PTS values, http://www.speakeasy.org/~xyzzy/pictures/pts-jitter.png
With floats, the pts values have a jitter of +- 4 ms from the correct
values. If I modify the ts demuxer to give me the pts values as a double,
the jitter is far less (about += .02 ms).
More information about the MPlayer-dev-eng
mailing list