]> git.sesse.net Git - vlc/commitdiff
fix #1409
authorRafaël Carré <funman@videolan.org>
Sun, 23 Dec 2007 00:30:19 +0000 (00:30 +0000)
committerRafaël Carré <funman@videolan.org>
Sun, 23 Dec 2007 00:30:19 +0000 (00:30 +0000)
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.h

index acc6d282715cfc967a76cf0f862d43ada480272d..ce4291a912628855d39fb0b8b1f5c2eb5aa1e206 100644 (file)
@@ -120,6 +120,15 @@ int Demux( demux_t *p_demux )
         i_ret = parse_playlist_node( p_demux, p_playlist, p_current_input,
                                      p_xml_reader, "playlist" ) ? 0 : -1;
 
+    int i;
+    for( i = 0 ; i < p_demux->p_sys->i_tracklist_entries ; i++ )
+    {
+        input_item_t *p_new_input = p_demux->p_sys->pp_tracklist[i];
+        if( p_new_input )
+        {
+            input_ItemAddSubItem( p_current_input, p_new_input );
+        }
+    }
 
     HANDLE_PLAY_AND_RELEASE;
     if( p_xml_reader )
@@ -882,9 +891,10 @@ static vlc_bool_t parse_extitem_node COMPLEX_INTERFACE
     if( p_new_input )
     {
         input_ItemAddSubItem( p_input_item, p_new_input );
+        p_demux->p_sys->pp_tracklist[i_href] = NULL;
     }
 
-    /* fix for #1293 - XTAG sends ENDELEM for self closing tag */
+    /* kludge for #1293 - XTAG sends ENDELEM for self closing tag */
     /* (libxml sends NONE) */
     xml_ReaderRead( p_xml_reader );
 
index e19aef0d98e6a0af0508a39152ae237942307c05..cd28c5c01324382e85dc20cc9a3282532f14db45 100644 (file)
 #define FREE_VALUE() if (psz_value) {free(psz_value);psz_value=NULL;}
 #define FREE_ATT()   FREE_NAME();FREE_VALUE()
 
-#define UNKNOWN_CONTENT 0
-#define SIMPLE_CONTENT 1
-#define COMPLEX_CONTENT 2
+enum {
+    UNKNOWN_CONTENT,
+    SIMPLE_CONTENT,
+    COMPLEX_CONTENT
+};
 
 #define SIMPLE_INTERFACE  (input_item_t    *p_input,\
                            const char      *psz_name,\