input_item_t *p_input;
input_item_t *p_current_input = GetCurrentItem(p_demux);
+ input_item_node_t *p_subitems = input_item_node_Create( p_current_input );
psz_line = stream_ReadLine( p_demux->s );
while( psz_line )
{
/* Extended info */
psz_parse += sizeof("EXTINF:") - 1;
+ free(psz_name);
+ free(psz_artist);
parseEXTINF( psz_parse, &psz_artist, &psz_name, &i_parsed_duration );
if( i_parsed_duration >= 0 )
i_duration = i_parsed_duration * INT64_C(1000000);
psz_mrl = ProcessMRL( psz_parse, p_demux->p_sys->psz_prefix );
b_cleanup = true;
- if( !psz_mrl ) goto error;
+ if( !psz_mrl )
+ {
+ LocaleFree( psz_parse );
+ goto error;
+ }
p_input = input_item_NewExt( p_demux, psz_mrl, psz_name,
i_options, ppsz_options, 0, i_duration );
if( psz_name ) input_item_SetTitle( p_input, psz_name );
input_item_AddSubItem( p_current_input, p_input );
+ input_item_node_AppendItem( p_subitems, p_input );
vlc_gc_decref( p_input );
}
b_cleanup = false;
}
}
+ input_item_AddSubItemTree( p_subitems );
+ input_item_node_Delete( p_subitems );
vlc_gc_decref(p_current_input);
var_Destroy( p_demux, "m3u-extvlcopt" );
return 0; /* Needed for correct operation of go back */