]> git.sesse.net Git - vlc/blobdiff - modules/demux/playlist/playlist.h
* Fixed a bunch of memory leaks.
[vlc] / modules / demux / playlist / playlist.h
index 610404651a6f130d63441602795df27b9ecbe8d5..4e643b85428dcf009a12634b7bf1914c46450f89 100644 (file)
@@ -48,7 +48,8 @@ void E_(Close_DVB) ( vlc_object_t * );
 int E_(Import_podcast) ( vlc_object_t * );
 void E_(Close_podcast) ( vlc_object_t * );
 
-int E_(xspf_import_Activate) ( vlc_object_t * );
+int E_(Import_xspf) ( vlc_object_t * );
+void E_(Close_xspf) ( vlc_object_t * );
 
 int E_(Import_Shoutcast) ( vlc_object_t * );
 void E_(Close_Shoutcast) ( vlc_object_t * );
@@ -62,18 +63,15 @@ void E_(Close_SGIMB) ( vlc_object_t * );
 int E_(Import_QTL) ( vlc_object_t * );
 void E_(Close_QTL) ( vlc_object_t * );
 
+int E_(Import_GVP) ( vlc_object_t * );
+void E_(Close_GVP) ( vlc_object_t * );
+
 #define INIT_PLAYLIST_STUFF \
     int i_parent_id; \
     vlc_bool_t b_play; \
     playlist_item_t *p_current, *p_item_in_category = NULL; \
     input_item_t *p_input; \
-    playlist_t *p_playlist = (playlist_t *) vlc_object_find( p_demux, \
-                                        VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); \
-    if( !p_playlist ) \
-    { \
-        msg_Err( p_demux, "can't find playlist" ); \
-        return VLC_EGENERIC; \
-    } \
+    playlist_t *p_playlist = pl_Yield( p_demux ); \
     i_parent_id = var_CreateGetInteger( p_demux, "parent-item" ); \
     if( i_parent_id > 0 ) \
     { \
@@ -84,7 +82,7 @@ void E_(Close_QTL) ( vlc_object_t * );
     { \
         b_play = E_(FindItem)( p_demux, p_playlist, &p_current ); \
         p_item_in_category = playlist_ItemToNode( p_playlist, p_current ); \
-        p_current->p_input->i_type = ITEM_TYPE_PLAYLIST;        \
+        p_item_in_category->p_input->i_type = ITEM_TYPE_PLAYLIST;        \
     }
 
 #define HANDLE_PLAY_AND_RELEASE \