[MPlayer-dev-eng] [PATCH] reorder pts when needed

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Nov 29 19:18:05 CET 2011


On Tue, Nov 29, 2011 at 08:14:30AM +0100, Dan Oscarsson wrote:
> mån 2011-11-28 klockan 19:23 +0100 skrev Reimar Döffinger:
> > > From my point there are two different cases:
> > >  1) pts are out of order in some cases
> > >  2) broken streams can result in bad pts values
> > > 
> > > The code we removed could be used to fix 2).
> > > But 1) I do not see as broken stream data, instead it is a failure in
> > > demuxer/decoder to not provide correct pts with correct frame.
> > 
> > Any remotely reasonable fix for 2) would fix 1).
> > The point of -nocorrect-pts is to handle 2).
> 
> Why is correct_pts enabled for some demuxers and not for others? Even
> streams in those setting correct_pts to true can have bad streams. If
> -nocorrect-pts is for handling broken streams, it should either be off
> for all or on for all, as a default. Streams from demux_avi are not more
> broken then streams from demux_lavf.

Well, AVI files generally are more broken, and we do not use lavf for
AVI.
Also lavf does its own tricks to beat the pts values to make sense.
In addition broken pts does not necessarily come from the streams, it
can also come from a broken demuxer. And for example our RM demuxer
IIRC misses some timestamp trickery so it will produce more broken
ones.
Lastly I also have been slightly redefining the _purpose_ of
-nocorrect-pts based on what it used to handle better more for
historical reasons.
One point to also keep in mind is that -fps does not work
with -correct-pts. I once hacked it to automatically switch the
mode if -fps was specified but I think it somehow is broken again.


More information about the MPlayer-dev-eng mailing list