[FFmpeg-cvslog] avformat/avidec: allow rounding errors between scale/rate and timebase
Michael Niedermayer
git at videolan.org
Wed Jun 4 05:31:35 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jun 4 05:04:13 2014 +0200| [571ab8344a9a2864d22d01af41283cee9328b927] | committer: Michael Niedermayer
avformat/avidec: allow rounding errors between scale/rate and timebase
Fixes Ticket3670
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=571ab8344a9a2864d22d01af41283cee9328b927
---
libavformat/avidec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 0db9f32..8c70649 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,
More information about the ffmpeg-cvslog
mailing list