[MPlayer-dev-eng] Patch for correct seek in MPEG files with ptsoffset != 0

Yaro Pollak slava at plris.com
Tue Jul 19 10:21:08 CEST 2005


Nico Sabbi wrote:

> Reimar Döffinger wrote:
>
> >Hi,
> >On Mon, Jul 18, 2005 at 10:48:19AM +0200, Yaro Pollak wrote:
> >
> >
> >>Following my post in MPlayer-users I'm posting the changes I made to
demux_mpg.c in order to correct a problem, where seeking was done
incorrectly (or not done at all) in MPEG-PS files that started with initial
pts > 0. I'm not sure if this is the best solution (as the time stamps
remain absolute, and not 0-based, it looks as if the movie started from the
middle, but at least the seek works now).
> >>
> >
> Yaro,
> can you upload to incoming a sample that can't seek without your patch,
> please?

I've uploaded a sample called impossible_seek.mpg to
ftp://ftp1.mplayerhq.hu/MPlayer/incoming.

> I agree. Yaro's  patch seems to be correct, but it's in the same line as
> the rest of the code
> in demux_mpg.
> That seek() part of that file can at best be qualified as an excercise
> in divination.
> Yaro, sooner or later that code will be rewritten correctly; in the
> meantime it's better
> not to add anything else to it, especially considering that other
> developers are working on
> a general demuxers restructuting.
>
>     Nico

I also agree, however, I need this done sooner than later, in particular,
right now :)
So I'm glad it's correct, it will do the job for me for now, and I'll be on
the lookout for any changes in future versions of MPlayer regarding this
matter.
I'm just glad I could be of any help (pointing out a problem there).
Thanks a lot

Yaro




More information about the MPlayer-dev-eng mailing list