diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-01 20:38:14 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-01 20:38:14 +0100 |
commit | 4a8e3324fb13f32c2288e698f44222c4f5caa3f0 (patch) | |
tree | 823d4e481adf87811ed8bdc9ac46158ceb78fd05 /libavcodec | |
parent | b50be4e38dc83389925dc14f24fa11e660d32197 (diff) | |
download | ffmpeg-4a8e3324fb13f32c2288e698f44222c4f5caa3f0.tar.gz |
libx264: fix generic boolean support
Fixes Ticket660
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/libx264.c | 6 |
1 files 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; } |