Commit 4927c0a9 authored by Muhammad Faiz's avatar Muhammad Faiz Committed by Michael Niedermayer

avutil/opt.c: fix bug when parsing option

fix these strange behavior:
-af flanger=delay=10 [OK]
-af flanger=delay=1e1 [OK]
-af flanger=delay=1e+1 [Error]
-af flanger=delay=0.1 [OK]
-af flanger=delay=1e-1 [Error]
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 40541716
......@@ -219,7 +219,7 @@ static int set_string_number(void *obj, void *target_obj, const AVOption *o, con
buf[i++] = *val;
}
for (; i < sizeof(buf) - 1 && val[i] && val[i] != '+' && val[i] != '-'; i++)
for (; i < sizeof(buf) - 1 && val[i] && (o->type != AV_OPT_TYPE_FLAGS || val[i] != '+' && val[i] != '-'); i++)
buf[i] = val[i];
buf[i] = 0;
......
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