Skip to content

Commit

Permalink
to_lavc_vid_conv: extra padding for alloc
Browse files Browse the repository at this point in the history
fixes `uv -t testcard:codec=R12L:size=1921x1080 -c lavc`
  • Loading branch information
MartinPulec committed Sep 3, 2024
1 parent 0df55a4 commit 62dece8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libavcodec/to_lavc_vid_conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 62dece8

Please sign in to comment.