diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-20 02:24:30 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-20 03:54:36 +0100 |
commit | f5c00b347dc76285c639d9878a014c40395c5228 (patch) | |
tree | 12698ebe541ed3c11bd92e2073133767e2e76ee7 /libavcodec/utils.c | |
parent | 2b10d414648bc01750c311a9bd0097eeb97b2286 (diff) | |
download | ffmpeg-f5c00b347dc76285c639d9878a014c40395c5228.tar.gz |
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>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 70475a15e4..3d7540792e 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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; |