]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/opt.c
Set cur_channel in the AAC encoder context where needed.
[ffmpeg] / libavcodec / opt.c
index 78fbfaeb5793fbaeb528bfc25691b3398e383e90..f9cba057591af899412d2d7836e589c53d1bd759 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file opt.c
+ * @file
  * AVOptions
  * @author Michael Niedermayer <michaelni@gmx.at>
  */
@@ -56,7 +56,7 @@ static int av_set_number2(void *obj, const char *name, double num, int den, int6
         return AVERROR(ENOENT);
 
     if(o->max*den < num*intnum || o->min*den > num*intnum) {
-        av_log(NULL, AV_LOG_ERROR, "Value %lf for parameter '%s' out of range\n", num, name);
+        av_log(obj, AV_LOG_ERROR, "Value %lf for parameter '%s' out of range\n", num, name);
         return AVERROR(ERANGE);
     }
 
@@ -156,7 +156,7 @@ int av_set_string3(void *obj, const char *name, const char *val, int alloc, cons
                 buf[i]= val[i];
             buf[i]=0;
 
-            d = ff_eval2(buf, const_values, const_names, NULL, NULL, NULL, NULL, NULL, &error);
+            d = ff_parse_and_eval_expr(buf, const_values, const_names, NULL, NULL, NULL, NULL, NULL, &error);
             if(isnan(d)) {
                 const AVOption *o_named= av_find_opt(obj, buf, o->unit, 0, 0);
                 if(o_named && o_named->type == FF_OPT_TYPE_CONST)
@@ -168,7 +168,7 @@ int av_set_string3(void *obj, const char *name, const char *val, int alloc, cons
                 else if(!strcmp(buf, "all"    )) d= ~0;
                 else {
                     if (error)
-                        av_log(NULL, AV_LOG_ERROR, "Unable to parse option value \"%s\": %s\n", val, error);
+                        av_log(obj, AV_LOG_ERROR, "Unable to parse option value \"%s\": %s\n", val, error);
                     return AVERROR(EINVAL);
                 }
             }
@@ -424,7 +424,7 @@ void av_opt_set_defaults2(void *s, int mask, int flags)
             break;
             case FF_OPT_TYPE_INT64:
                 if((double)(opt->default_val+0.6) == opt->default_val)
-                    av_log(s, AV_LOG_DEBUG, "loss of precission in default of %s\n", opt->name);
+                    av_log(s, AV_LOG_DEBUG, "loss of precision in default of %s\n", opt->name);
                 av_set_int(s, opt->name, opt->default_val);
             break;
             case FF_OPT_TYPE_FLOAT: {