From 7868349a9159a5e6c4cc1c1daa0a8873b6360a74 Mon Sep 17 00:00:00 2001 From: Panagiotis Issaris Date: Fri, 20 Jul 2007 15:09:10 +0000 Subject: [PATCH] Return AVERROR(EINVAL) when invalid width and/or height are specified to avcodec_open. Originally committed as revision 9770 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index cd7bc1c09a..fd757fdfcb 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -847,6 +847,7 @@ int avcodec_open(AVCodecContext *avctx, AVCodec *codec) if((avctx->coded_width||avctx->coded_height) && avcodec_check_dimensions(avctx,avctx->coded_width,avctx->coded_height)){ av_freep(&avctx->priv_data); + ret = AVERROR(EINVAL); goto end; }