Commit e09ffa45 authored by Michael Niedermayer's avatar Michael Niedermayer

msvideo1enc: Check that dimensions are a multiple of 4.

Fixes Ticket784
Found by: ami_stuff
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9cb6a39c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment