Commit e75b531e authored by benoit's avatar benoit

Update offset in the option string later, to have a better error message.

Patch by Stefano Sabatini stefanoTODsabatini-lalaCHEZposteTODit


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13153 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2276513d
...@@ -159,7 +159,6 @@ const AVOption *av_set_string(void *obj, const char *name, const char *val){ ...@@ -159,7 +159,6 @@ const AVOption *av_set_string(void *obj, const char *name, const char *val){
for(i=0; i<sizeof(buf)-1 && val[i] && val[i]!='+' && val[i]!='-'; i++) for(i=0; i<sizeof(buf)-1 && val[i] && val[i]!='+' && val[i]!='-'; i++)
buf[i]= val[i]; buf[i]= val[i];
buf[i]=0; buf[i]=0;
val+= i;
d = ff_eval2(buf, const_values, const_names, NULL, NULL, NULL, NULL, NULL, &error); d = ff_eval2(buf, const_values, const_names, NULL, NULL, NULL, NULL, NULL, &error);
if(isnan(d)) { if(isnan(d)) {
...@@ -184,6 +183,7 @@ const AVOption *av_set_string(void *obj, const char *name, const char *val){ ...@@ -184,6 +183,7 @@ const AVOption *av_set_string(void *obj, const char *name, const char *val){
d= -d; d= -d;
av_set_number(obj, name, d, 1, 1); av_set_number(obj, name, d, 1, 1);
val+= i;
if(!*val) if(!*val)
return o; return o;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment