[FFmpeg-devel] [PATCH 4/4] mpsmpeg4: use av_image_check_size
Peter Ross
pross at xvid.org
Sun Nov 25 03:21:06 CET 2012
Signed-off-by: Peter Ross <pross at xvid.org>
---
libavcodec/msmpeg4.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index 39305f7..e80db6d 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;
--
1.8.0
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121125/24d1566e/attachment.asc>
More information about the ffmpeg-devel
mailing list