Fix invalid duration of AV1 01/245601/2 accepted/tizen/unified/20201105.124332 submit/tizen/20201013.060431 submit/tizen/20201104.234113
authorjiyong.min <jiyong.min@samsung.com>
Tue, 13 Oct 2020 02:52:33 +0000 (11:52 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Tue, 13 Oct 2020 03:47:09 +0000 (12:47 +0900)
 - 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

index b0f809b..b975e01 100755 (executable)
@@ -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 */