diff --git a/src/libavcodec/to_lavc_vid_conv.c b/src/libavcodec/to_lavc_vid_conv.c index a0e113496..7b0bf0b43 100644 --- a/src/libavcodec/to_lavc_vid_conv.c +++ b/src/libavcodec/to_lavc_vid_conv.c @@ -1756,7 +1756,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);