[MPlayer-dev-eng] Re: [PATCH] dvr-ms fixes for pts, key frame detection and seeking

Nico Sabbi nsabbi at email.it
Wed Feb 7 23:37:57 CET 2007

John Donaghy wrote:

>> Old timing code expects the demuxer to sort the timestamps. It should
>> work if you use -correct-pts (though if the file/stream doesn't start at
>> an I frame and the codec uses a binary decoder which doesn't distinguish
>> buffered/dropped frames then that might cause problems).
> Thanks for the reply. It seems to work if I use the timestamps found 
> in the
> file in conjunction with the -correct-pts option. However that means a 
> user
> has to know that they need to supply that option in order to play the 
> file.
> Wouldnt it be better if it could be made to work without the extra 
> options?
> Also, it still doesnt solve the problem of samples that only contain
> timestamps on I-frames. I still need to read up to the second I-frame in
> order to calculate an average frametime. In those circumstances is it
> acceptable to discard the frames before the second I-frame? Or, is it 
> better
> to buffer them somewhere and apply  the timestamps once the average is
> calculated? The first choice is obviously simpler if it's acceptable.
> John

you could call repeatedly ds_fill_buffer() until you find the second I-frame
(in this case save the second pts in priv->something),
then discard all packets (ds_free_packs()) and seek back to the initial 
but is it really necessary if you use -correct-pts?

More information about the MPlayer-dev-eng mailing list