Commit 98f70f4f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Memory error handling

parent d79eca2e
......@@ -2120,9 +2120,9 @@ static int InputSourceInit( input_thread_t *p_input,
{
/* special hack for forcing a demuxer with --demux=module
* (and do nothing with a list) */
char *psz_var_demux = var_GetString( p_input, "demux" );
char *psz_var_demux = var_GetNonEmptyString( p_input, "demux" );
if( *psz_var_demux != '\0' &&
if( psz_var_demux != NULL' &&
!strchr(psz_var_demux, ',' ) &&
!strchr(psz_var_demux, ':' ) )
{
......@@ -2130,11 +2130,8 @@ static int InputSourceInit( input_thread_t *p_input,
msg_Dbg( p_input, "enforced demux ` %s'", psz_demux );
}
else if( psz_var_demux )
{
free( psz_var_demux );
}
}
/* Try access_demux if no demux given */
if( *psz_demux == '\0' )
......
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