[FFmpeg-devel] [PATCH] avutil/opt.c: fix bug when parsing option
Muhammad Faiz
mfcc64 at gmail.com
Mon Jul 21 11:31:41 CEST 2014
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]
thank's
-------------- next part --------------
---
libavutil/opt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 505e010..8e9802f 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;
--
1.8.3.1
More information about the ffmpeg-devel
mailing list