ffmpeg | branch: master | Muhammad Faiz <mfc...@gmail.com> | Mon Jul 21 
02:31:41 2014 -0700| [4927c0a9880be4e322d8256fea99b09568235665] | committer: 
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: Michael Niedermayer <michae...@gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4927c0a9880be4e322d8256fea99b09568235665
---

 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;
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to