[FFmpeg-devel] [PATCH] Implement guessed_pts in avcodec_decode_video2.

Måns Rullgård mans
Sun Jan 30 21:51:16 CET 2011

Nicolas George <nicolas.george at normalesup.org> writes:

> Le primidi 11 pluvi?se, an CCXIX, M?ns Rullg?rd a ?crit?:
>> That's not answering the question.  There should _never_ be any need
>> to guess a PTS.
> As far as I can tell, the purpose of this patch is to determine which one,
> among PTS and DTS, is the more reliable. It was originally introduced in
> revision 21579 almost exactly a year ago. Ido not think this was discussed
> on the list; I suppose Michael can explain what issue it fixed at the time.

Either you have the timestamps and should consider them reliable, or
you do not, and will have to extrapolate using frame rate.  The only
unreliable timestamps here are the ones lavf invents out of thin air.
If that nonsense were removed, this hack could probably go away at the
same time.  The timestamp handling is currently ugly hack piled upon
uglier hack finished off with a few dirty workarounds.  It needs to be
fixed, not merely shuffled around to fit the phase of the moon.

> Furthermore, it gives a place to implement, maybe, PTS wrap-around
> detection, should someone want to implement it.

That does not belong under the name of "guess".

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list