mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +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:
parent
9cb6a39c46
commit
e09ffa4524
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user