1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-13 02:35:50 +02:00

msvideo1enc: Check that dimensions are a multiple of 4.

Fixes Ticket784
Found by: ami_stuff

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-12-17 23:08:46 +01:00
parent 9cb6a39c46
commit e09ffa4524

View File

@ -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;