[MPlayer-G2-dev] Recommendations for DEMUXER layer
D Richard Felker III
dalias at aerifal.cx
Sat Dec 20 10:15:27 CET 2003
OK, one more...
3. PTS handling is really bogus in some demuxers. Sometimes ds->pts is
scaled by rate_d, sometimes not.
My recommendation is for pts to always be in units of rate_d/rate_m.
This is consistent with the design of NUT, which was made for
non-idiotic handling of pts. If a demuxer really needs units of
1/rate_m, it should set rate_d to 1 (like mpeg does).
In any case, the vp layer uses time bases like NUT. To pick a good
time base, it needs to know _correct_ values for rate_d and rate_m.
Not only is this important for filters that want to adjust timestamps;
it also matters so that mencoder-g2's muxers can auto-select a time
base that won't waste bits!
If you insist on leaving rate_d and rate_m as-is, I can just divide
pts by rate_d myself....but this will give inaccurate timestamps for
audio with AVI when -nobps is used!
BTW, I think AVI is the only demuxer that uses rate_d!=1, so this is a
fairly trivial change.
Rich
More information about the MPlayer-G2-dev
mailing list