[FFmpeg-devel] [PATCH 2/2] avcodec/gif: pass frame pkt_duration to pkt duration

Paul B Mahol onemda at gmail.com
Sun Aug 29 20:09:55 EEST 2021


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavcodec/gif.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index 5e7cc47206..6f389c8ac3 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -514,6 +514,7 @@ static int gif_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     }
 
     pkt->size   = outbuf_ptr - pkt->data;
+    pkt->duration = av_rescale_q(pict->pkt_duration, av_make_q(1, 100), avctx->time_base);
     if (s->image || !avctx->frame_number)
         pkt->flags |= AV_PKT_FLAG_KEY;
     *got_packet = 1;
-- 
2.17.1



More information about the ffmpeg-devel mailing list