Signed-off-by: Vitaly Buka <[email protected]>
---
libavformat/movenc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 2838286141..e70500ae2c 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -5354,6 +5354,10 @@ static int mov_write_single_packet(AVFormatContext *s,
AVPacket *pkt)
// duration, but only helps for this particular track, not
// for the other ones that are flushed at the same time.
trk->track_duration = pkt->dts - trk->start_dts;
+ if (trk->start_dts != AV_NOPTS_VALUE)
+ trk->track_duration = pkt->dts - trk->start_dts;
+ else
+ trk->track_duration = 0;
if (pkt->pts != AV_NOPTS_VALUE)
trk->end_pts = pkt->pts;
else
--
2.14.2.920.gcf0c67979c-goog
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel