mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avformat/asfdec: Avoid float usage in duration calculation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
db07fc2020
commit
f902b0b2cb
@ -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...
|
if (!(asf->hdr.flags & 0x01)) { // if we aren't streaming...
|
||||||
int64_t fsize = avio_size(pb);
|
int64_t fsize = avio_size(pb);
|
||||||
if (fsize <= 0 || (int64_t)asf->hdr.file_size <= 0 ||
|
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 /
|
st->duration = asf->hdr.play_time /
|
||||||
(10000000 / 1000) - start_time;
|
(10000000 / 1000) - start_time;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user