]> git.sesse.net Git - vlc/blobdiff - modules/demux/playlist/shoutcast.c
input_item: compress two functions into one and rename "Add" into "Post" for clarity...
[vlc] / modules / demux / playlist / shoutcast.c
index a6086312065c449df9353c2edcf3d907530acb59..dcaa0559bd1c3f5811997c3d7245713bf97829c3 100644 (file)
@@ -126,7 +126,8 @@ static int Demux( demux_t *p_demux )
             goto error;
     }
 
-    input_item_AddSubItemTree( p_input_node );
+    input_item_node_PostAndDelete( p_input_node );
+    p_input_node = NULL;
 
     i_ret = 0; /* Needed for correct operation of go back */
 
@@ -136,7 +137,7 @@ error:
     if( p_xml )
         xml_Delete( p_xml );
     free( psz_eltname );
-    input_item_node_Delete( p_input_node );
+    if( p_input_node ) input_item_node_Delete( p_input_node );
     vlc_gc_decref(p_current_input);
     return i_ret;
 }