diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-04 05:04:13 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-06-09 23:47:35 +0200 |
commit | 29c8fac3f72c4a6e8c5e2492d0edcb6b979ac9d4 (patch) | |
tree | e46061ba5a6e3da4c8d661d194bbec4ec733043b | |
parent | 8c33d40a7b8a44f550a1fb11a082a95aaa606284 (diff) | |
download | ffmpeg-29c8fac3f72c4a6e8c5e2492d0edcb6b979ac9d4.tar.gz |
avformat/avidec: allow rounding errors between scale/rate and timebase
Fixes Ticket3670
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 571ab8344a9a2864d22d01af41283cee9328b927)
-rw-r--r-- | libavformat/avidec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 9b706b2d96..a7e1c5b8d1 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1685,8 +1685,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, continue; // av_assert1(st2->codec->block_align); - av_assert0((int64_t)st2->time_base.num * ast2->rate == - (int64_t)st2->time_base.den * ast2->scale); + av_assert0(fabs(av_q2d(st2->time_base) - ast2->scale / (double)ast2->rate) < av_q2d(st2->time_base) * 0.00000001); index = av_index_search_timestamp(st2, av_rescale_q(timestamp, st->time_base, |