mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 02:12:28 +00:00
avformat/mov: Set duration to zero if the duration is UINT_MAX
Fixes some MP4F files which have duration in mdhd set to UINT_MAX instead of zero. Signed-off-by: Sasi Inguva <isasi@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
d34c1b389e
commit
9d8d7bdffb
@ -1489,6 +1489,11 @@ static int mov_read_mdhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
}
|
||||
st->duration = (version == 1) ? avio_rb64(pb) : avio_rb32(pb); /* duration */
|
||||
|
||||
if ((version == 1 && st->duration == UINT64_MAX) ||
|
||||
(version != 1 && st->duration == UINT32_MAX)) {
|
||||
st->duration = 0;
|
||||
}
|
||||
|
||||
lang = avio_rb16(pb); /* language */
|
||||
if (ff_mov_lang_to_iso639(lang, language))
|
||||
av_dict_set(&st->metadata, "language", language, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user