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

Nicolas George nicolas.george at normalesup.org
Wed Oct 6 13:44:04 CEST 2010


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.

> It's not the kind of code I'd like to see, but I see it may be useful,  
> especially for mencoder.

That was the point, although the same change also corrects direct playing.

The way I see it, timestamps resets are just broken, and we do what we can
to limit their bad consequences.

> Did you test it with some telecined or PAFF content?

No, but I would gladly do it if you point me to relevant samples.

Regards,

-- 
  Nicolas George
-------------- 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/e7621a89/attachment.pgp>


More information about the MPlayer-dev-eng mailing list