提交 f566ac48 编写于 作者: M Michael Niedermayer

avutil/frame: fix video buffer allocation

The padding was lost during porting from avcodec
Should fix out of array accesses

Found-by: ubitux
Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 be5c5c39
......@@ -134,7 +134,7 @@ static int get_video_buffer(AVFrame *frame, int align)
if (i == 1 || i == 2)
h = -((-h) >> desc->log2_chroma_h);
frame->buf[i] = av_buffer_alloc(frame->linesize[i] * h);
frame->buf[i] = av_buffer_alloc(frame->linesize[i] * h + 16);
if (!frame->buf[i])
goto fail;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册