From 4a8e3324fb13f32c2288e698f44222c4f5caa3f0 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 1 Dec 2011 20:38:14 +0100 Subject: [PATCH] libx264: fix generic boolean support Fixes Ticket660 Signed-off-by: Michael Niedermayer --- libavcodec/libx264.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 7410112172..fafc3fd6a2 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -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; }