From 5cec11b612e40b89e8c4f55f82ad0f2c953809c4 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Thu, 15 May 2008 01:03:48 +0000 Subject: [PATCH] =?UTF-8?q?Make=20av=5Fset=5Fstring()=20fail=20when=20numb?= =?UTF-8?q?er=20could=20not=20be=20set.=20Patch=20by=20Stefano=20Sabatini?= =?UTF-8?q?=20stefano=C2=A7sabatini-lalaATposte=C2=A7it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally committed as revision 13155 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/opt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/opt.c b/libavcodec/opt.c index d8b1b0de06..94ac622180 100644 --- a/libavcodec/opt.c +++ b/libavcodec/opt.c @@ -182,7 +182,8 @@ const AVOption *av_set_string(void *obj, const char *name, const char *val){ }else if(cmd=='-') d= -d; - av_set_number(obj, name, d, 1, 1); + if (!av_set_number(obj, name, d, 1, 1)) + return NULL; val+= i; if(!*val) return o;