[FFmpeg-cvslog] avcodec/mlpenc: use av_shrink_packet()

Paul B Mahol git at videolan.org
Sun Sep 5 15:10:14 EEST 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Sep  5 14:08:08 2021 +0200| [ac29cec312b7efc2f3cc59a84515ceb4356406f3] | committer: Paul B Mahol

avcodec/mlpenc: use av_shrink_packet()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac29cec312b7efc2f3cc59a84515ceb4356406f3
---

 libavcodec/mlpenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
index 31ec4ba040..b8800aa21b 100644
--- a/libavcodec/mlpenc.c
+++ b/libavcodec/mlpenc.c
@@ -2300,7 +2300,8 @@ input_and_return:
         ff_af_queue_remove(&ctx->afq, avctx->frame_size, &avpkt->pts,
                            &avpkt->duration);
 
-        avpkt->size = bytes_written;
+        av_shrink_packet(avpkt, bytes_written);
+
         *got_packet = 1;
     } else {
         *got_packet = 0;



More information about the ffmpeg-cvslog mailing list