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

avcodec_align_dimensions2: Ensure cinepak has large enough buffers.

This is partly redundant with the following patches, but its safer

Found-by: u-bo1b@0w.se
Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 2b10d414
......@@ -267,7 +267,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
case AV_PIX_FMT_PAL8:
case AV_PIX_FMT_BGR8:
case AV_PIX_FMT_RGB8:
if (s->codec_id == AV_CODEC_ID_SMC) {
if (s->codec_id == AV_CODEC_ID_SMC ||
s->codec_id == AV_CODEC_ID_CINEPAK) {
w_align = 4;
h_align = 4;
}
......@@ -279,6 +280,12 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
h_align = 4;
}
break;
case AV_PIX_FMT_RGB24:
if (s->codec_id == AV_CODEC_ID_CINEPAK) {
w_align = 4;
h_align = 4;
}
break;
default:
w_align = 1;
h_align = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册