Mercurial > libavcodec.hg
comparison opt.c @ 11739:ceffa0ca7596 libavcodec
Change the order of parameters for ff_eval_expr() and
ff_parse_and_eval_expr(), place the names for constants/functions
before the corresponding values.
This looks more readable, as the user is expected to know the names
before the values.
author | stefano |
---|---|
date | Sun, 16 May 2010 23:00:22 +0000 |
parents | 7dd2a45249a9 |
children | c6368258b694 |
comparison
equal
deleted
inserted
replaced
11738:9bfef228a117 | 11739:ceffa0ca7596 |
---|---|
154 | 154 |
155 for(i=0; i<sizeof(buf)-1 && val[i] && val[i]!='+' && val[i]!='-'; i++) | 155 for(i=0; i<sizeof(buf)-1 && val[i] && val[i]!='+' && val[i]!='-'; i++) |
156 buf[i]= val[i]; | 156 buf[i]= val[i]; |
157 buf[i]=0; | 157 buf[i]=0; |
158 | 158 |
159 d = ff_parse_and_eval_expr(buf, const_values, const_names, NULL, NULL, NULL, NULL, NULL, &error); | 159 d = ff_parse_and_eval_expr(buf, const_names, const_values, NULL, NULL, NULL, NULL, NULL, &error); |
160 if(isnan(d)) { | 160 if(isnan(d)) { |
161 const AVOption *o_named= av_find_opt(obj, buf, o->unit, 0, 0); | 161 const AVOption *o_named= av_find_opt(obj, buf, o->unit, 0, 0); |
162 if(o_named && o_named->type == FF_OPT_TYPE_CONST) | 162 if(o_named && o_named->type == FF_OPT_TYPE_CONST) |
163 d= o_named->default_val; | 163 d= o_named->default_val; |
164 else if(!strcmp(buf, "default")) d= o->default_val; | 164 else if(!strcmp(buf, "default")) d= o->default_val; |