Message ID | c8ed337b-7851-ceca-640f-d03b6bb6045e@gmail.com |
---|---|
State | New |
Headers | show |
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 46d314ff17..6cd209266d 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -5612,7 +5612,7 @@ static int mov_write_single_packet(AVFormatContext *s, AVPacket *pkt) // sample in this track. This avoids relying on AVPacket // 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; + trk->track_duration = pkt->dts - trk->start_dts + pkt->duration; if (pkt->pts != AV_NOPTS_VALUE)