}
/* Find a usable sout and attach it to p_input */
- psz = var_GetString( p_input, "sout" );
- if( *psz && strncasecmp( p_input->p->input.p_item->psz_uri, "vlc:", 4 ) )
+ psz = var_GetNonEmptyString( p_input, "sout" );
+ if( psz && strncasecmp( p_input->p->input.p_item->psz_uri, "vlc:", 4 ) )
{
/* Check the validity of the provided sout */
if( p_input->p->p_sout )
}
/* Look for and add subtitle files */
- psz_subtitle = var_GetString( p_input, "sub-file" );
- if( *psz_subtitle )
+ psz_subtitle = var_GetNonEmptyString( p_input, "sub-file" );
+ if( psz_subtitle != NULL )
{
msg_Dbg( p_input, "forced subtitle: %s", psz_subtitle );
input_AddSubtitles( p_input, psz_subtitle, VLC_FALSE );
/* Try to autoselect the first autodetected subtitles file
* if no subtitles file was specified */
- if( *psz_subtitle == 0 && subs && subs[0] )
+ if( ( psz_subtitle == NULL ) && subs && subs[0] )
{
input_AddSubtitles( p_input, subs[0], VLC_FALSE );
free( subs[0] );
free( psz_subtitle );
/* Look for slave */
- psz = var_GetString( p_input, "input-slave" );
- if( *psz )
+ psz = var_GetNonEmptyString( p_input, "input-slave" );
+ if( psz != NULL )
{
char *psz_delim;
input_source_t *slave;
else free( slave );
psz = psz_delim;
}
+ free( psz );
}
- if( psz ) free( psz );
}
else
{
}
/* */
- psz_tmp = psz = var_GetString( p_input, "access-filter" );
+ psz_tmp = psz = var_GetNonEmptyString( p_input, "access-filter" );
while( psz && *psz )
{
access_t *p_access = in->p_access;
psz = end;
}
- if( psz_tmp ) free( psz_tmp );
+ free( psz_tmp );
/* Get infos from access */
if( !p_input->b_preparsing )