Revision 9ace13b4 libavcodec/opt.c

View differences:

libavcodec/opt.c
165 165
                else if(!strcmp(buf, "none"   )) d= 0;
166 166
                else if(!strcmp(buf, "all"    )) d= ~0;
167 167
                else {
168
                    d = ff_parse_and_eval_expr(buf, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, obj);
169
                    if (isnan(d)){
168
                    int res = ff_parse_and_eval_expr(&d, buf, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, obj);
169
                    if (res < 0) {
170 170
                        av_log(obj, AV_LOG_ERROR, "Unable to parse option value \"%s\"\n", val);
171
                    return AVERROR(EINVAL);
171
                        return res;
172 172
                    }
173 173
                }
174 174
            }

Also available in: Unified diff