[MPlayer-dev-eng] [PATCH] fix reordering

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Jul 18 16:28:37 CEST 2010


On Sun, Jul 18, 2010 at 02:37:30PM +0200, Dan Oscarsson wrote:
> sön 2010-07-18 klockan 14:17 +0200 skrev Reimar Döffinger:
> > On Sun, Jul 18, 2010 at 01:23:44PM +0200, Dan Oscarsson wrote:
> > > sön 2010-07-18 klockan 12:55 +0200 skrev Reimar Döffinger:
> > > > On Sun, Jul 18, 2010 at 11:30:05AM +0200, Dan Oscarsson wrote:
> > > > > > Then the need to use -correct-pts should be fixed.
> > > > > 
> > > > > You mean that demuxer/decoder should do the reordering instead?
> > > > 
> > > > There is no timestamp reordering without -correct-pts since the
> > > > timestamps aren't used. Only frame rate is used.
> > > 
> > > The A-V sync correction code in mplayer.c are using timstamps to
> > > calculate how to correct a-v sync. So timestamp reordering in
> > > decode_video would reduce corrections even when -correct-pts is not
> > > used.
> > 
> > But it is supposed to work even when they aren't right.
> > If it doesn't work right there's probably some other bug, and
> > just hiding it is not a good solution.
> 
> It does work, but works better if timestamps are in correct order as a-v
> correction gets smaller. So why not always reorder?

It's just the question if it's worth the trouble.
The reordering code really doesn't work well when things go wrong, and
the non-correct-pts code is specifically for the cases when we expect
things to go wrong.
IIRC there's also some interaction between the frame parsing code
and this, which AFAIK frame parsing currently only runs without
correct-pts.
I admit I haven't looked into the details though.


More information about the MPlayer-dev-eng mailing list