mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 00:32:31 +00:00
Show duration for large asf files as written in the file header.
Fixes ticket #3428.
This commit is contained in:
parent
29fc468d0a
commit
e3fd263f0b
@ -372,7 +372,8 @@ 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) < 10000)
|
||||
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)
|
||||
st->duration = asf->hdr.play_time /
|
||||
(10000000 / 1000) - start_time;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user