diff options
author | Muhammad Faiz <mfcc64@gmail.com> | 2014-07-21 02:31:41 -0700 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-21 15:20:39 +0200 |
commit | 4927c0a9880be4e322d8256fea99b09568235665 (patch) | |
tree | 8add872c158c07921a4b6606bf50a7a353f5e05a /libavutil | |
parent | 40541716661eef877dcff43a4d35e7ad31ea992a (diff) | |
download | ffmpeg-4927c0a9880be4e322d8256fea99b09568235665.tar.gz |
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: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/opt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index 505e0103db..8e9802fa48 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -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; |