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
pull/126/head
Stefano Sabatini 17 years ago committed by Benoit Fouet
parent 7c55e71d51
commit 5cec11b612
  1. 3
      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;

Loading…
Cancel
Save