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: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commitf5c00b347d
) Conflicts: libavcodec/utils.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit2b6f3be082
) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -165,9 +165,10 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){
|
||||
case PIX_FMT_PAL8:
|
||||
case PIX_FMT_BGR8:
|
||||
case PIX_FMT_RGB8:
|
||||
if(s->codec_id == CODEC_ID_SMC){
|
||||
w_align=4;
|
||||
h_align=4;
|
||||
if (s->codec_id == CODEC_ID_SMC ||
|
||||
s->codec_id == CODEC_ID_CINEPAK) {
|
||||
w_align = 4;
|
||||
h_align = 4;
|
||||
}
|
||||
break;
|
||||
case PIX_FMT_BGR24:
|
||||
@@ -176,6 +177,12 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){
|
||||
h_align=4;
|
||||
}
|
||||
break;
|
||||
case PIX_FMT_RGB24:
|
||||
if (s->codec_id == CODEC_ID_CINEPAK) {
|
||||
w_align = 4;
|
||||
h_align = 4;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
w_align= 1;
|
||||
h_align= 1;
|
||||
|
Reference in New Issue
Block a user