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

Dan Oscarsson Dan.Oscarsson at tieto.com
Sun Jul 11 11:06:39 CEST 2010


On 2010-07-01 at 18:43 +0200 Reimar Döffinger wrote:
> On Sat, Jun 26, 2010 at 08:44:02AM +0200, Dan Oscarsson wrote:
> > When seeking some demuxers (for example demux_ts.c) returns
> > MP_NOPTS_VALUE for first video frame after the seek. For the mpeg-ts
> > files I have -correct-pts hate to be set for them to play correctly.
> > Unfortunately the reordering code in libmpcodecs/dec_video.c ignores a
> > frame, if the pts have value MP_NOPTS_VALUE, resulting in one frame
> > being out of order in each set of frames after a seek. This gives bad
> > video playback.
> > 
> > As I have written in the patch, I cannot see that including
> > MP_NOPTS_VALUE in the reordering should be a problem, as it is a large
> > negative value (at least on my computers), and sorts before the
> > following frames.
> 
> I suspect that it will break PAFF samples with -demuxer lavf again.

>From what Carl Eugen Hoyos wrote it may have been fixed so it works.

> Also, I really can't see what it should change, correct_pts is not
> set for demux_ts and AFAIK it does not work with it.

It is necessary to set -correct-pts for all LATM DVB-T recordings I have
and work fine without my patch - if you do not seek in the file. If you
seek, the reorder code fails - normally missing one out of four frames.
With my patch it work all the time.

If you do not like to fix it the way my patch does - what shall we do to
fix it? I do not want to try to understand the seek code in demux_ts.c
to get the seek to work, when it can be fixed so easily in dec_video.c.

  Dan



More information about the MPlayer-dev-eng mailing list