diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2008-05-15 01:03:48 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2008-05-15 01:03:48 +0000 |
commit | 5cec11b612e40b89e8c4f55f82ad0f2c953809c4 (patch) | |
tree | 16f8161e3b7f0e017ddfc12c1e80f673a401baa9 | |
parent | 7c55e71d51f3e9bd86d2eb4379160a8c3acb9f0a (diff) | |
download | ffmpeg-5cec11b612e40b89e8c4f55f82ad0f2c953809c4.tar.gz |
Make av_set_string() fail when number could not be set.
Patch by Stefano Sabatini stefano§sabatini-lalaATposte§it
Originally committed as revision 13155 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/opt.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |