[FFmpeg-devel] [PATCH] lavf: inspect more frames when the time base is unreliable

Reimar Döffinger Reimar.Doeffinger
Sat Jan 29 15:33:25 CET 2011

On Sat, Jan 29, 2011 at 04:10:38PM +0200, Anssi Hannula wrote:
> Well, I see that for normal non-MPEG2/non-H264 files we use the
> framerate calculated from the codec time base (as below). Do you think
> using that would be ok for H.264 as well (at least if the first 5 or so
> timestamps seem to match that value, assuming H264 is considered
> unreliable for a reason), or if we should add some new case for using
> the format headers instead.

While the code gets progressively uglier that way, using the value
from the header if it's within a few % should be safe and fix at least
that case.

More information about the ffmpeg-devel mailing list