Re: Recommendations for DEMUXER layer

D Richard Felker III <[email protected]> Mon, 29 Dec 2003 12:21:21 -0500
Newsgroups gmane.comp.video.mplayer.g2.devel
Message-ID <[email protected]>
On Mon, Dec 29, 2003 at 09:20:24AM +0100, Arpi wrote:
> Hi,
> 
> > OK, one more...
> > 
> > 3. PTS handling is really bogus in some demuxers. Sometimes ds->pts is
> >    scaled by rate_d, sometimes not.
> 
> WTF?

AVI demuxer outputs rate_m*framenumber for pts.
NUT demuxer outputs ticknumber for pts.
MPEG and ASF also use ticknumber, but it's the same since their rate_m
is implicitly 1 (1/90000 and 1/1000).

> > My recommendation is for pts to always be in units of rate_d/rate_m.
> 
> it _IS_
> 
> if it isn't, it's a bug then!!

Then you agree that AVI should just output chunk number for pts, at
least for video? Right now pts advances by rate_m for each frame,
which makes no sense to me... For audio, the demuxer should probably
also output chunk number (along with rate_m/rate_d values, of course)
and the framer could transform that to sample numbers (i.e. in units
of samplerate) or leave it in chunk numbers for fixed framesize audio
codecs.

Rich