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

Nico Sabbi nsabbi at tiscali.it
Tue Jul 19 00:13:21 CEST 2005


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?

>Though this is an improvement, in the end it is also only yet another
>hack for yet another special case.
>What would be necessary is implementing -forceidx for MPEG (giving the
>same effect as mencoder -oac copy -ovc copy -of mpeg),
>
>Greetings,
>Reimar Döffinger
>
>
>  
>

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




More information about the MPlayer-dev-eng mailing list