aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vc2enc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-26 18:16:24 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-26 20:07:21 +0200
commitaa2e0b868df559a17a10fc40578617bc254885b8 (patch)
tree20828ab46974efab7a9098f9f9c3f54af16e6fcc /libavcodec/vc2enc.c
parentcc7943e80329524b41672ab68f8bdf758c4e5551 (diff)
downloadffmpeg-aa2e0b868df559a17a10fc40578617bc254885b8.tar.gz
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 <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/vc2enc.c')
-rw-r--r--libavcodec/vc2enc.c2
1 files changed, 1 insertions, 1 deletions
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;