Re: Recommendations for DEMUXER layer
D Richard Felker III <[email protected]>
| Newsgroups | gmane.comp.video.mplayer.g2.devel |
|---|---|
| Message-ID | <[email protected]> |
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