1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-02 09:09:59 +02:00

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>
This commit is contained in:
Andreas Rheinhardt 2021-04-26 18:16:24 +02:00
parent cc7943e803
commit aa2e0b868d

View File

@ -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;