diff options
author | Peter Ross <pross@xvid.org> | 2012-11-25 13:21:06 +1100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-25 18:38:12 +0100 |
commit | 33181975b5ac104807a35b65a2df0f87b07fdb74 (patch) | |
tree | 10647870377cbc40ddaf71764d0110a8040ca07a /libavcodec/msmpeg4.c | |
parent | a246a603bf8195d09e81aa6a0d9f1bdd361ae700 (diff) | |
download | ffmpeg-33181975b5ac104807a35b65a2df0f87b07fdb74.tar.gz |
mpsmpeg4: use av_image_check_size
Signed-off-by: Peter Ross <pross@xvid.org>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/msmpeg4.c')
-rw-r--r-- | libavcodec/msmpeg4.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index 39305f74a6..e80db6dde5 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -36,6 +36,7 @@ #include "mpeg4video.h" #include "msmpeg4data.h" #include "vc1data.h" +#include "libavutil/imgutils.h" /* * You can also call this codec : MPEG4 with a twist ! @@ -590,13 +591,11 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; static volatile int done = 0; - int i; + int i, ret; MVTable *mv; - if(avctx->width<=0 || avctx->height<=0) { - av_log(avctx, AV_LOG_ERROR, "invalid dimensions\n"); - return -1; - } + if ((ret = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0) + return ret; if (ff_h263_decode_init(avctx) < 0) return -1; |