to_lavc_vid_conv: extra padding for alloc

fixes `uv -t testcard:codec=R12L:size=1921x1080 -c lavc`
This commit is contained in:
Martin Pulec
2024-09-02 12:04:24 +02:00
parent ca0baf8340
commit acd73df59c

View File

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