diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-17 23:08:46 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-03 19:08:44 +0100 |
commit | 1bb565360cd9cb904bb22d0c367f226b3b417d3e (patch) | |
tree | c6f78982c2043cf4957c217685e9b6b1b033ffe2 | |
parent | 1acf921d6f30dba14cec7f334feeeddd433e256a (diff) | |
download | ffmpeg-1bb565360cd9cb904bb22d0c367f226b3b417d3e.tar.gz |
msvideo1enc: Check that dimensions are a multiple of 4.
Fixes Ticket784
Found by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e09ffa45243e8615f3f9874c2d59abf6edde7084)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/msvideo1enc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/msvideo1enc.c b/libavcodec/msvideo1enc.c index 837fca5ea4..09cc7a196d 100644 --- a/libavcodec/msvideo1enc.c +++ b/libavcodec/msvideo1enc.c @@ -261,6 +261,10 @@ static av_cold int encode_init(AVCodecContext *avctx) if (av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) { return -1; } + if((avctx->width&3) || (avctx->height&3)){ + av_log(avctx, AV_LOG_ERROR, "width and height must be multiplies of 4\n"); + return -1; + } avcodec_get_frame_defaults(&c->pic); avctx->coded_frame = (AVFrame*)&c->pic; |