Commit a9d754a3 authored by Loren Merritt's avatar Loren Merritt

fix parsing of --deblock %d,%d (beta was ignored)


git-svn-id: svn://svn.videolan.org/x264/trunk@597 df754926-b1dd-0310-bc7b-ec298dee348c
parent ccac553d
...@@ -313,13 +313,15 @@ int x264_param_parse( x264_param_t *p, const char *name, const char *value ) ...@@ -313,13 +313,15 @@ int x264_param_parse( x264_param_t *p, const char *name, const char *value )
p->b_deblocking_filter = !atobool(value); p->b_deblocking_filter = !atobool(value);
OPT2("filter", "deblock") OPT2("filter", "deblock")
{ {
int count; if( 2 == sscanf( value, "%d:%d", &p->i_deblocking_filter_alphac0, &p->i_deblocking_filter_beta ) ||
if( 0 < (count = sscanf( value, "%d:%d", &p->i_deblocking_filter_alphac0, &p->i_deblocking_filter_beta )) || 2 == sscanf( value, "%d,%d", &p->i_deblocking_filter_alphac0, &p->i_deblocking_filter_beta ) )
0 < (count = sscanf( value, "%d,%d", &p->i_deblocking_filter_alphac0, &p->i_deblocking_filter_beta )) )
{ {
p->b_deblocking_filter = 1; p->b_deblocking_filter = 1;
if( count == 1 ) }
p->i_deblocking_filter_beta = p->i_deblocking_filter_alphac0; else if( sscanf( value, "%d", &p->i_deblocking_filter_alphac0 ) )
{
p->b_deblocking_filter = 1;
p->i_deblocking_filter_beta = p->i_deblocking_filter_alphac0;
} }
else else
p->b_deblocking_filter = atobool(value); p->b_deblocking_filter = atobool(value);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment