diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-26 14:02:25 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-26 14:51:29 +0300 |
commit | f902b0b2cbdcb21c6c888819fbc51de2168d7d5a (patch) | |
tree | 16843233b1b7558eb8a41a70416bad99b28d3ff5 /libavformat | |
parent | db07fc20200d7d7b0fd39ae38645b10b7589d5ea (diff) |
avformat/asfdec: Avoid float usage in duration calculation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/asfdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 359ee8be2f..92784348cb 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -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; } |