Commit f902b0b2 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/asfdec: Avoid float usage in duration calculation

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent db07fc20
......@@ -380,7 +380,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
if (!(asf->hdr.flags & 0x01)) { // if we aren't streaming...
int64_t fsize = avio_size(pb);
if (fsize <= 0 || (int64_t)asf->hdr.file_size <= 0 ||
FFABS(fsize - (int64_t)asf->hdr.file_size) / (float)FFMIN(fsize, asf->hdr.file_size) < 0.05)
20*FFABS(fsize - (int64_t)asf->hdr.file_size) < FFMIN(fsize, asf->hdr.file_size))
st->duration = asf->hdr.play_time /
(10000000 / 1000) - start_time;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment