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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Nov 27 19:33:54 CET 2011


On Sun, Nov 27, 2011 at 07:02:43PM +0100, Dan Oscarsson wrote:
> sön 2011-11-27 klockan 18:20 +0100 skrev Reimar Döffinger:
> 
> > The point of -nocorrect-pts mode is to be based on FPS first of all,
> > the fact that single incorrect pts matter so much seems to indicate
> > that for some reason it no longer properly fulfills that point.
> 
> I have additional code that aligns video frame display with vsyncs. This
> allows me to play 24Hz movies on my 24HZ lcd tv without frame drops or
> judder. If the pts values are not in order, there will be missed vsyncs
> or fram drops to compensate giving bad viewing on tv.
> 
> I would expect decode_video to return correct pts for each frame. If the
> intention of -nocorrect-pts mode is for decode_video to return wrong pts
> for a given frame - then that is not what I would have expected. To
> return a somewhat incorrect value - yes, but to return the pts of
> another frame - no.

Uh, and what would be the difference between these? A "somewhat
incorrect value" most often is "none at all". But it might also be one
that is way of like,
0, 1, 2, 100000, 4, ...
e.g. due to stream corruption.
In general they might also be completely jumbled, e.g. due to pts/dts
mixup and a few re-encodes after that (common when AVI was used
as intermediate format).

> I assumed -nocorrect-pts mode is the old way to do it.

That too. But I don't consider that a good enough justification
to redefine -nocorrect-pts to "only works with correct PTS values
just like -correct-pts, except for some bugs that cancel out against
some demuxer bugs".

> I would not be surprised if there are other cases where
> reordering is not done - but needed to get the rights pts values for
> each frame.

The point is not whether reordering is required to get the correct
PTS but why the code should be allowed to break when the PTS are
not correct.
But I don't seem to convince anyone so I guess I'll try to find time
to do it myself, probably trying to fix that code we removed instead
of just removing it.


More information about the MPlayer-dev-eng mailing list