Commit 6d8b6289 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

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".
(cherry picked from commit fffd3cd1)
Signed-off-by: default avatarDerk-Jan Hartman <hartman@videolan.org>
parent 3e81ceae
......@@ -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