lavf: inspect more frames for fps when container time base is coarse
authorAnssi Hannula <anssi.hannula@iki.fi>
Thu, 28 Apr 2011 18:47:40 +0000 (20:47 +0200)
committerReinhard Tartler <siretart@sandy.tauware.de>
Fri, 29 Apr 2011 20:46:13 +0000 (22:46 +0200)
commit7c152a458d3fb0a2fb1aef1f05bfee90fe70697e
tree10d871325c8fe7f40629da6dcfdc1b3f6d5c6b3e
parent0247bdee2581a6857a24c5ff297f01d3a3112b11
lavf: inspect more frames for fps when container time base is coarse

As per issue2629, most 23.976fps matroska H.264 files are incorrectly
detected as 24fps, as the matroska timestamps usually have only
millisecond precision.

Fix that by doubling the amount of timestamps inspected for frame rate
for streams that have coarse time base. This also fixes 29.970 detection
in matroska.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 78431098f9e306ebe27e7698d0ae539e3df2afe9)

Tested with mplayer based on this report
http://thread.gmane.org/gmane.comp.video.mplayer.user/66043/focus=66063

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
libavformat/utils.c
tests/ref/fate/cscd