aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-04 05:04:13 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2014-06-10 00:18:22 +0200
commit9e9d92bbcc4fb25fbe2bbc3b9aff3f29ed7b7ee5 (patch)
treebc3b6864e8ce99f267ed8e8c1b2d5a041cae9f7e
parent3d79041f85498eee309bc3c2adc985a9686a5057 (diff)
downloadffmpeg-9e9d92bbcc4fb25fbe2bbc3b9aff3f29ed7b7ee5.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) Conflicts: libavformat/avidec.c
-rw-r--r--libavformat/avidec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index e3a153af1f..fbbcde7dff 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1520,7 +1520,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
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, st2->time_base) * FFMAX(ast2->sample_size, 1),