[FFmpeg-cvslog] r13153 - trunk/libavcodec/opt.c

benoit subversion
Wed May 14 04:14:12 CEST 2008


Author: benoit
Date: Wed May 14 04:14:11 2008
New Revision: 13153

Log:
Update offset in the option string later, to have a better error message.
Patch by Stefano Sabatini stefanoTODsabatini-lalaCHEZposteTODit


Modified:
   trunk/libavcodec/opt.c

Modified: trunk/libavcodec/opt.c
==============================================================================
--- trunk/libavcodec/opt.c	(original)
+++ trunk/libavcodec/opt.c	Wed May 14 04:14:11 2008
@@ -159,7 +159,6 @@ const AVOption *av_set_string(void *obj,
             for(i=0; i<sizeof(buf)-1 && val[i] && val[i]!='+' && val[i]!='-'; i++)
                 buf[i]= val[i];
             buf[i]=0;
-            val+= i;
 
             d = ff_eval2(buf, const_values, const_names, NULL, NULL, NULL, NULL, NULL, &error);
             if(isnan(d)) {
@@ -184,6 +183,7 @@ const AVOption *av_set_string(void *obj,
                 d= -d;
 
             av_set_number(obj, name, d, 1, 1);
+            val+= i;
             if(!*val)
                 return o;
         }




More information about the ffmpeg-cvslog mailing list