[MPlayer-G2-dev] Recommendations for DEMUXER layer
arpi at thot.banki.hu
Mon Dec 29 20:53:40 CET 2003
> > > 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.
ah, i think i remember now. it was more clever idea behind it.
to get frame number: frameno=ptsvalue/rate_d
to get time position: seconds=ptsvalue/rate_m
and ptsvalue is always integer and can produce accurate values for
so, demuxers for formats storing frame/chunk number (avi) will scale by
rate_d, demuxers for timestamp-based formats (asf) will scale by rate_m
so for both kind of formats, only integer*integer multiply is done,
so no bit loss :)
> > > My recommendation is for pts to always be in units of rate_d/rate_m.
> > it _IS_
ok, it isn't... i was wrong :)
A'rpi / Astral & ESP-team
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu
More information about the MPlayer-G2-dev