avformat/avidec: allow rounding errors between scale/rate and timebase
Fixes Ticket3670 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
19c9d1e8e7
commit
571ab8344a
@ -1780,8 +1780,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// av_assert1(st2->codec->block_align);
|
// av_assert1(st2->codec->block_align);
|
||||||
av_assert0((int64_t)st2->time_base.num * ast2->rate ==
|
av_assert0(fabs(av_q2d(st2->time_base) - ast2->scale / (double)ast2->rate) < av_q2d(st2->time_base) * 0.00000001);
|
||||||
(int64_t)st2->time_base.den * ast2->scale);
|
|
||||||
index = av_index_search_timestamp(st2,
|
index = av_index_search_timestamp(st2,
|
||||||
av_rescale_q(timestamp,
|
av_rescale_q(timestamp,
|
||||||
st->time_base,
|
st->time_base,
|
||||||
|
Loading…
Reference in New Issue
Block a user