Commit edcbf581 authored by Clément Stenac's avatar Clément Stenac

Fix input-slave parser

parent 5b2069fd
...@@ -715,23 +715,21 @@ static int Init( input_thread_t * p_input ) ...@@ -715,23 +715,21 @@ static int Init( input_thread_t * p_input )
psz = var_GetString( p_input, "input-slave" ); psz = var_GetString( p_input, "input-slave" );
if( *psz ) if( *psz )
{ {
char *psz_delim = strchr( psz, '#' ); char *psz_delim;
input_source_t *slave;
for( ;; ) while( psz && *psz )
{ {
input_source_t *slave; while( *psz == ' ' || *psz == '#' )
{
if( psz_delim ) psz++;
}
if( ( psz_delim = strchr( psz, '#' ) ) )
{ {
*psz_delim++ = '\0'; *psz_delim++ = '\0';
} }
if( *psz == 0 )
if( *psz == '\0' )
{ {
if( psz_delim ) break;
continue;
else
break;
} }
msg_Dbg( p_input, "adding slave '%s'", psz ); msg_Dbg( p_input, "adding slave '%s'", psz );
...@@ -740,11 +738,10 @@ static int Init( input_thread_t * p_input ) ...@@ -740,11 +738,10 @@ static int Init( input_thread_t * p_input )
{ {
TAB_APPEND( p_input->i_slave, p_input->slave, slave ); TAB_APPEND( p_input->i_slave, p_input->slave, slave );
} }
if( !psz_delim ) psz = psz_delim;
break;
} }
free( psz );
} }
free( psz );
/* Set up es_out */ /* Set up es_out */
es_out_Control( p_input->p_es_out, ES_OUT_SET_ACTIVE, VLC_TRUE ); es_out_Control( p_input->p_es_out, ES_OUT_SET_ACTIVE, VLC_TRUE );
......
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