]> git.sesse.net Git - vlc/commitdiff
xspf: Fix a crash on track elements without a location
authorDerk-Jan Hartman <hartman@videolan.org>
Thu, 25 Jun 2009 12:21:53 +0000 (14:21 +0200)
committerDerk-Jan Hartman <hartman@videolan.org>
Thu, 25 Jun 2009 12:24:05 +0000 (14:24 +0200)
A <track> can have 0 or more <location> elements. VLC doesn't like elements without a uri however, so init an element with vlc://nop. Note also that we currently only support 1 location element per track....

This closes #2891

modules/demux/playlist/xspf.c

index f6eb1651708b036532099dc8148ebd248e19d003..938ecfee48792c44cd64f47aff692601486b6351 100644 (file)
@@ -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, NULL, NULL );
+    input_item_t *p_new_input = input_item_New( p_demux, "vlc://nop", NULL );
 
     if( !p_new_input )
     {