From acd73df59cd6b51c36df4bf92611d560dd004a00 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 2 Sep 2024 12:04:24 +0200 Subject: [PATCH] to_lavc_vid_conv: extra padding for alloc fixes `uv -t testcard:codec=R12L:size=1921x1080 -c lavc` --- src/libavcodec/to_lavc_vid_conv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libavcodec/to_lavc_vid_conv.c b/src/libavcodec/to_lavc_vid_conv.c index 6922db377..c2deca522 100644 --- a/src/libavcodec/to_lavc_vid_conv.c +++ b/src/libavcodec/to_lavc_vid_conv.c @@ -1664,7 +1664,9 @@ struct to_lavc_vid_conv *to_lavc_vid_conv_init(codec_t in_pixfmt, int width, int av_get_pix_fmt_name(out_pixfmt), get_codec_name(s->decoded_codec)); watch_pixfmt_degrade(MOD_NAME, get_pixfmt_desc(in_pixfmt), get_pixfmt_desc(s->decoded_codec)); watch_pixfmt_degrade(MOD_NAME, get_pixfmt_desc(s->decoded_codec), av_pixfmt_get_desc(out_pixfmt)); - s->decoded = (unsigned char *) malloc((long) vc_get_linesize(width, s->decoded_codec) * height); + s->decoded = (unsigned char *) malloc( + (long) vc_get_linesize(width, s->decoded_codec) * height + + MAX_PADDING); s->pixfmt_conv_callback = select_pixfmt_callback(out_pixfmt, s->decoded_codec);