]> git.sesse.net Git - vlc/blobdiff - src/playlist/services_discovery.c
Fully privatize vlc_sd_internal_t
[vlc] / src / playlist / services_discovery.c
index 57d8928501001a05cb04402ef657ff9369a0b303..1aa8f64e685ca8dea83bc60b46c6ad57bef16f8a 100644 (file)
 #include "playlist_internal.h"
 #include "../libvlc.h"
 
+struct vlc_sd_internal_t
+{
+    /* the playlist items for category and onelevel */
+    playlist_item_t      *p_cat;
+    playlist_item_t      *p_one;
+    services_discovery_t *p_sd; /**< Loaded service discovery modules */
+    char                 *psz_name;
+};
 
 static void services_discovery_Destructor ( vlc_object_t *p_obj );
 
@@ -256,8 +264,7 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist, const char *psz_modul
     }
 
     /* Free in playlist_ServicesDiscoveryRemove */
-    struct playlist_services_discovery_support_t * p_sds;
-    p_sds = malloc( sizeof(struct playlist_services_discovery_support_t) );
+    vlc_sd_internal_t * p_sds = malloc( sizeof(*p_sds) );
     if( !p_sds )
     {
         vlc_sd_Destroy( p_sd );
@@ -315,7 +322,7 @@ int playlist_ServicesDiscoveryRemove( playlist_t * p_playlist,
                                       const char *psz_name )
 {
     playlist_private_t *priv = pl_priv( p_playlist );
-    struct playlist_services_discovery_support_t * p_sds = NULL;
+    vlc_sd_internal_t * p_sds = NULL;
 
     PL_LOCK;
     for( int i = 0; i < priv->i_sds; i++ )