Commit 33181975 authored by Peter Ross's avatar Peter Ross Committed by Michael Niedermayer

mpsmpeg4: use av_image_check_size

Signed-off-by: 's avatarPeter Ross <pross@xvid.org>
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a246a603
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "mpeg4video.h" #include "mpeg4video.h"
#include "msmpeg4data.h" #include "msmpeg4data.h"
#include "vc1data.h" #include "vc1data.h"
#include "libavutil/imgutils.h"
/* /*
* You can also call this codec : MPEG4 with a twist ! * You can also call this codec : MPEG4 with a twist !
...@@ -590,13 +591,11 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) ...@@ -590,13 +591,11 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
{ {
MpegEncContext *s = avctx->priv_data; MpegEncContext *s = avctx->priv_data;
static volatile int done = 0; static volatile int done = 0;
int i; int i, ret;
MVTable *mv; MVTable *mv;
if(avctx->width<=0 || avctx->height<=0) { if ((ret = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0)
av_log(avctx, AV_LOG_ERROR, "invalid dimensions\n"); return ret;
return -1;
}
if (ff_h263_decode_init(avctx) < 0) if (ff_h263_decode_init(avctx) < 0)
return -1; return -1;
......
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