diff options
author | Janne Grunau <janne-libav@jannau.net> | 2014-01-29 15:12:48 +0100 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2014-01-31 11:09:10 +0100 |
commit | 78987a88a88b28d93d03ed6c228bcb33f178444f (patch) | |
tree | a1c1ba1d2a0bb4717600da80a63b235c15f53073 /libavformat | |
parent | 5312818524484a995433b986a2a7a6602572d4db (diff) | |
download | ffmpeg-78987a88a88b28d93d03ed6c228bcb33f178444f.tar.gz |
lavf: include 60 fps in guessed standard frame rates
Due to what looks like an off-by-one error 60 * 12 * 1001 / 12 * 1001
is not tested as standard frame rate in avformat_find_stream_info().
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index eaedf74c50..01215ef257 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2175,7 +2175,7 @@ static void compute_chapters_end(AVFormatContext *s) static int get_std_framerate(int i) { if (i < 60 * 12) - return i * 1001; + return (i + 1) * 1001; else return ((const int[]) { 24, 30, 60, 12, 15 })[i - 60 * 12] * 1000 * 12; } @@ -2458,7 +2458,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) /* Round guessed framerate to a "standard" framerate if it's * within 1% of the original estimate. */ - for (j = 1; j < MAX_STD_TIMEBASES; j++) { + for (j = 0; j < MAX_STD_TIMEBASES; j++) { AVRational std_fps = { get_std_framerate(j), 12 * 1001 }; double error = fabs(av_q2d(st->avg_frame_rate) / av_q2d(std_fps) - 1); |