On 17-06-2019 01:37 PM, Alfred E. Heggestad wrote:
From c69b63a7af5531257753754e64ac33b7ef530e75 Mon Sep 17 00:00:00 2001
From: "Alfred E. Heggestad" <alfred.hegges...@gmail.com>
Date: Mon, 17 Jun 2019 10:04:08 +0200
Subject: [PATCH] movenc: calculate track_duration without packet duration

---
 libavformat/movenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 46d314ff17..fa5833962b 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -5486,7 +5486,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
                    "this case.\n",
                    pkt->stream_index, pkt->dts);
     }
-    trk->track_duration = pkt->dts - trk->start_dts + pkt->duration;
+    trk->track_duration = pkt->dts - trk->start_dts;

Why?

trk->last_sample_is_subtitle_end = 0;

     if (pkt->pts == AV_NOPTS_VALUE) {

Gyan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to