diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-20 02:24:30 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-28 03:52:07 +0100 |
commit | 5f5bf9faf902d48162d92876b150c7441e9d7cca (patch) | |
tree | db8ae7a57f51ea16848aecd0ba45b606042f95eb | |
parent | c2d3f06882abb0298a76a264b423d7c28155bb70 (diff) | |
download | ffmpeg-5f5bf9faf902d48162d92876b150c7441e9d7cca.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>
(cherry picked from commit f5c00b347dc76285c639d9878a014c40395c5228)
Conflicts:
libavcodec/utils.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2b6f3be08250683407c7a9846d7133b116661eae)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/utils.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index acfafa1344..99bfae4a0e 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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; |