Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-18 02:08:46 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-12-18 02:25:59 +0400
commite09ffa45243e8615f3f9874c2d59abf6edde7084 (patch)
tree7100c0161fe956c3800b99e0f4c17aecccbfa88b /libavcodec/msvideo1enc.c
parent9cb6a39c461abc8d3dd79dc5a59243038664fb65 (diff)
msvideo1enc: Check that dimensions are a multiple of 4.
Fixes Ticket784 Found by: ami_stuff Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/msvideo1enc.c')
-rw-r--r--libavcodec/msvideo1enc.c4
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;