vlc | branch: master | Thomas Guillem <[email protected]> | Tue Jun 7 13:44:50 2016 +0200| [5a5432f582eab0766208c590db079bba87f43983] | committer: Thomas Guillem
input/input: move LoadVarSlaves up For next commit. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5a5432f582eab0766208c590db079bba87f43983 --- src/input/input.c | 68 ++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/input/input.c b/src/input/input.c index 2c2e9a2..240cb8a 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -989,6 +989,40 @@ static void SetSubtitlesOptions( input_thread_t *p_input ) var_SetInteger( p_input, "spu-delay", (mtime_t)i_delay * 100000 ); } +static void LoadVarSlaves( input_thread_t *p_input ) +{ + char *psz = var_GetNonEmptyString( p_input, "input-slave" ); + if( !psz ) + return; + + char *psz_org = psz; + while( psz && *psz ) + { + while( *psz == ' ' || *psz == '#' ) + psz++; + + char *psz_delim = strchr( psz, '#' ); + if( psz_delim ) + *psz_delim++ = '\0'; + + if( *psz == 0 ) + break; + + char *uri = strstr(psz, "://") + ? strdup( psz ) : vlc_path2uri( psz, NULL ); + psz = psz_delim; + if( uri == NULL ) + continue; + msg_Dbg( p_input, "adding slave input '%s'", uri ); + + input_source_t *p_slave = InputSourceNew( p_input, uri, NULL, false ); + if( p_slave ) + TAB_APPEND( p_input->p->i_slave, p_input->p->slave, p_slave ); + free( uri ); + } + free( psz_org ); +} + static void LoadSlaves( input_thread_t *p_input ) { input_item_slave_t **pp_slaves; @@ -1139,40 +1173,6 @@ static void LoadSlaves( input_thread_t *p_input ) var_Destroy( p_input, "sub-description" ); } -static void LoadVarSlaves( input_thread_t *p_input ) -{ - char *psz = var_GetNonEmptyString( p_input, "input-slave" ); - if( !psz ) - return; - - char *psz_org = psz; - while( psz && *psz ) - { - while( *psz == ' ' || *psz == '#' ) - psz++; - - char *psz_delim = strchr( psz, '#' ); - if( psz_delim ) - *psz_delim++ = '\0'; - - if( *psz == 0 ) - break; - - char *uri = strstr(psz, "://") - ? strdup( psz ) : vlc_path2uri( psz, NULL ); - psz = psz_delim; - if( uri == NULL ) - continue; - msg_Dbg( p_input, "adding slave input '%s'", uri ); - - input_source_t *p_slave = InputSourceNew( p_input, uri, NULL, false ); - if( p_slave ) - TAB_APPEND( p_input->p->i_slave, p_input->p->slave, p_slave ); - free( uri ); - } - free( psz_org ); -} - static void UpdatePtsDelay( input_thread_t *p_input ) { input_thread_private_t *p_sys = p_input->p; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
