X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fstream_output%2Fstream_output.c;h=1d86013bbf3936a99ed81dcf9acfd8faa583651b;hb=9db69040afd0265ee446d000ce8582f8104116fe;hp=0680c23f1bc6f8af3fe71ddf9051774cc050aa54;hpb=a31d6d62cc808d3098f1c1d35f06d5510d50da6b;p=vlc diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c index 0680c23f1b..1d86013bbf 100644 --- a/src/stream_output/stream_output.c +++ b/src/stream_output/stream_output.c @@ -947,6 +947,7 @@ void __sout_ParseCfg( vlc_object_t *p_this, char *psz_prefix, const char **ppsz_ while( cfg ) { vlc_value_t val; + vlc_bool_t b_yes = VLC_TRUE; if( cfg->psz_name == NULL || *cfg->psz_name == '\0' ) { @@ -971,9 +972,20 @@ void __sout_ParseCfg( vlc_object_t *p_this, char *psz_prefix, const char **ppsz_ /* get the type of the variable */ i_type = config_GetType( p_this, psz_name ); - if( !i_type ) + if( !i_type && !strncmp( cfg->psz_name, "no", 2 ) ) { - /* TODO check for no, no- */ + free( psz_name ); + b_yes = VLC_FALSE; + + if( !strncmp( cfg->psz_name, "no-", 3 ) ) + { + asprintf( &psz_name, "%s%s", psz_prefix, cfg->psz_name + 3 ); + } + else + { + asprintf( &psz_name, "%s%s", psz_prefix, cfg->psz_name + 2 ); + } + i_type = config_GetType( p_this, psz_name ); } if( !i_type ) @@ -989,6 +1001,9 @@ void __sout_ParseCfg( vlc_object_t *p_this, char *psz_prefix, const char **ppsz_ switch( i_type ) { + case VLC_VAR_BOOL: + val.b_bool = b_yes; + break; case VLC_VAR_INTEGER: val.i_int = atoi( cfg->psz_value ? cfg->psz_value : "0" ); break; @@ -998,8 +1013,6 @@ void __sout_ParseCfg( vlc_object_t *p_this, char *psz_prefix, const char **ppsz_ case VLC_VAR_STRING: val.psz_string = cfg->psz_value; break; - - case VLC_VAR_BOOL: default: msg_Warn( p_this, "unhandled config var type" ); memset( &val, 0, sizeof( vlc_value_t ) );