aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-04 05:04:13 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-04 05:04:13 +0200
commit571ab8344a9a2864d22d01af41283cee9328b927 (patch)
tree6ae5d152e715d4c4367f3409c858bc4b3d55d979 /libavformat/avidec.c
parent19c9d1e8e71da04c3ac940206619c0a2d01e5193 (diff)
downloadffmpeg-571ab8344a9a2864d22d01af41283cee9328b927.tar.gz
avformat/avidec: allow rounding errors between scale/rate and timebase
Fixes Ticket3670 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 0db9f32ef9..8c70649b47 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1780,8 +1780,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,