libx264: fix generic boolean support
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 1 Dec 2011 19:38:14 +0000 (20:38 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 1 Dec 2011 19:38:14 +0000 (20:38 +0100)
Fixes Ticket660

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/libx264.c

index 7410112..fafc3fd 100644 (file)
@@ -350,8 +350,10 @@ static av_cold int X264_init(AVCodecContext *avctx)
         const char *p= x4->x264opts;
         while(p){
             char param[256]={0}, val[256]={0};
-            sscanf(p, "%255[^:=]=%255[^:]", param, val);
-            OPT_STR(param, val);
+            if(sscanf(p, "%255[^:=]=%255[^:]", param, val) == 1){
+                OPT_STR(param, "1");
+            }else
+                OPT_STR(param, val);
             p= strchr(p, ':');
             p+=!!p;
         }