ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Mon Apr 26 18:16:24 2021 +0200| [aa2e0b868df559a17a10fc40578617bc254885b8] | 
committer: Andreas Rheinhardt

avcodec/vc2enc: Actually zero padding

This encoder sets the min_size in ff_alloc_packet2(), so it can not rely
on av_packet_make_refcounted() to zero the padding.

Reviewed-by: Lynne <d...@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>

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

 libavcodec/vc2enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c
index 7bd2e4c2ab..6c2e873a23 100644
--- a/libavcodec/vc2enc.c
+++ b/libavcodec/vc2enc.c
@@ -993,7 +993,7 @@ static av_cold int vc2_encode_frame(AVCodecContext *avctx, 
AVPacket *avpkt,
     }
 
     flush_put_bits(&s->pb);
-    avpkt->size = put_bits_count(&s->pb) >> 3;
+    av_shrink_packet(avpkt, put_bytes_output(&s->pb));
 
     *got_packet = 1;
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to