[MPlayer-dev-eng] [PATCH] Detect and compensate pts reset in MPEG streams

Michael Niedermayer michaelni at gmx.at
Wed Oct 6 21:18:51 CEST 2010


On Wed, Oct 06, 2010 at 01:44:04PM +0200, Nicolas George wrote:
> Le quintidi 15 vendémiaire, an CCXIX, Nico Sabbi a écrit :
> > why do you set it equal to the last pts found? Yes, it may be the  
> > closest approximation but still it's imprecise and lead
> > to some frame drop.
> 
> Indeed, I did not see anything better. And more fancy stuff, like estimating
> the end of the last packet, would not necessarily be more accurate. For
> example, for the DVD I was working on, the last audio packet of chapter 1
> has pts=90.268 and duration=0.032 while the first audio packet of chapter 2
> has pts=0.135267, which puts the reset at pts=90.164733, before the last
> packet.

use lavf. it searches for the mpeg frames, parses them and provides you with
packet durations and framerate

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20101006/823e0261/attachment-0001.pgp>


More information about the MPlayer-dev-eng mailing list