]> git.sesse.net Git - ffmpeg/commitdiff
libavformat/mov: restore use of mfra time as dts
authorJohn Stebbins <jstebbins@jetheaddev.com>
Mon, 6 Apr 2020 17:42:26 +0000 (11:42 -0600)
committerGyan Doshi <ffmpeg@gyani.pro>
Sat, 11 Apr 2020 06:33:58 +0000 (12:03 +0530)
This was inadvertantly removed in 4a9d32baca

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
libavformat/mov.c

index 0c4e468dd4581f49a5221670a4422e90f720974f..32f51e6a4cd252ca2848d988c943d643cbf85ca6 100644 (file)
@@ -4805,6 +4805,11 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
             pts = frag_stream_info->first_tfra_pts;
             av_log(c->fc, AV_LOG_DEBUG, "found mfra time %"PRId64
                     ", using it for pts\n", pts);
+        } else if (frag_stream_info->first_tfra_pts != AV_NOPTS_VALUE &&
+            c->use_mfra_for == FF_MOV_FLAG_MFRA_DTS) {
+            dts = frag_stream_info->first_tfra_pts;
+            av_log(c->fc, AV_LOG_DEBUG, "found mfra time %"PRId64
+                    ", using it for dts\n", pts);
         } else if (frag_stream_info->sidx_pts != AV_NOPTS_VALUE) {
             // FIXME: sidx earliest_presentation_time is *PTS*, s.b.
             // pts = frag_stream_info->sidx_pts;