Hi,

I had a look at https://trac.ffmpeg.org/ticket/3052.
The issue is that the last frame duration is lost. Is there any reason why the 
packet duration is not transmitted from the demuxer to the muxer?
Attached is a dumb patch, just to understand a bit more why things are done the 
way they are...

Cheers,
-- 
Ben
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 9fa8e16..7c009d7 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2063,6 +2063,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
             avpkt->size = 0;
         else if (!(avctx->codec->capabilities & CODEC_CAP_DELAY))
             avpkt->pts = avpkt->dts = frame->pts;
+        if (frame)
+            avpkt->duration = av_frame_get_pkt_duration(frame);
 
         if (needs_realloc && avpkt->data) {
             ret = av_buffer_realloc(&avpkt->buf, avpkt->size + FF_INPUT_BUFFER_PADDING_SIZE);
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to