Commit fffd3cd1 authored by hartman's avatar hartman
Browse files

xspf: Don't nop item->psz_nam

Set the nop at the end of parsing, instead of the beginning, because SetURI will only init the name once. Now we had all media library items with the title "nop".
parent 36eb6ac9
......@@ -416,7 +416,7 @@ static bool parse_track_node COMPLEX_INTERFACE
{NULL, UNKNOWN_CONTENT, {NULL} }
};
input_item_t *p_new_input = input_item_New( p_demux, "vlc://nop", NULL );
input_item_t *p_new_input = input_item_New( p_demux, NULL, NULL );
if( !p_new_input )
{
......@@ -503,11 +503,20 @@ static bool parse_track_node COMPLEX_INTERFACE
FREE_ATT();
return false;
}
/* leave if the current parent node <track> is terminated */
if( !strcmp( psz_name, psz_element ) )
{
FREE_ATT();
/* Make sure we have a URI */
char *psz_uri = input_item_GetURI( p_new_input );
if( !psz_uri )
{
input_item_SetURI( p_new_input, "vlc://nop" );
}
free( psz_uri );
if( p_demux->p_sys->i_track_id < 0 )
{
input_item_AddSubItem( p_input_item, p_new_input );
......
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