From 49f73e85670b9fe2aa8c7ce576b19188e3ae3102 Mon Sep 17 00:00:00 2001 From: "jiyong.min" Date: Tue, 13 Oct 2020 11:52:33 +0900 Subject: [PATCH] Fix invalid duration of AV1 - Problem The duration of AV1 is always '0'sec. - Cause Initializing the duration is needed when fragments are used. - Solution Apply patch from FFmpeg. Change-Id: I7d184cb8562ec874ada0037850e003d6e192fe72 --- libavformat/mov.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index b0f809b..b975e01 100755 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2941,6 +2941,9 @@ static int mov_read_trex(MOVContext *c, AVIOContext *pb, MOVAtom atom) c->trex_count = 0; return err; } + + c->fc->duration = AV_NOPTS_VALUE; // the duration from mvhd is not representing the whole file when fragments are used. + trex = &c->trex_data[c->trex_count++]; avio_r8(pb); /* version */ avio_rb24(pb); /* flags */ -- 2.7.4