]> git.sesse.net Git - vlc/blobdiff - modules/demux/playlist/ram.c
various modules: adjust to new playlist design
[vlc] / modules / demux / playlist / ram.c
index 8542f0631ef2b2a3f005c4f8079f1920aa6ddb67..ce7cc822be212a969ab6a07ca6d9635ea80c8044 100644 (file)
@@ -214,6 +214,8 @@ static int Demux( demux_t *p_demux )
 
     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 )
     {
@@ -326,6 +328,7 @@ static int Demux( demux_t *p_demux )
             if( !EMPTY_STR( psz_comments ) ) input_item_SetDescription( p_input, psz_comments );
 
             input_item_AddSubItem( p_current_input, p_input );
+            input_item_node_AppendItem( p_subitems, p_input );
             vlc_gc_decref( p_input );
             free( psz_mrl );
         }
@@ -358,6 +361,8 @@ static int Demux( demux_t *p_demux )
             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 */