[vlc-devel] commit: Retain SD name for matching purpose ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue May 19 17:04:31 CEST 2009


vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Tue May 19 17:55:47 2009 +0300| [f2955030321e4947bb4dbc80cedc65950d91fd39] | committer: Rémi Denis-Courmont 

Retain SD name for matching purpose

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f2955030321e4947bb4dbc80cedc65950d91fd39
---

 src/playlist/playlist_internal.h  |   16 ++++++++++------
 src/playlist/services_discovery.c |    2 ++
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 86279f6..cae5b04 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -41,6 +41,15 @@
 #include "fetcher.h"
 #include "preparser.h"
 
+typedef struct playlist_services_discovery_support_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;
+} vlc_sd_internal_t;
+
+
 typedef struct playlist_private_t
 {
     playlist_t           public_data;
@@ -50,12 +59,7 @@ typedef struct playlist_private_t
     playlist_item_array_t items_to_delete; /**< Array of items and nodes to
             delete... At the very end. This sucks. */
 
-    struct playlist_services_discovery_support_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 */
-    } ** pp_sds;
+    vlc_sd_internal_t   **pp_sds;
     int                   i_sds;   /**< Number of service discovery modules */
     input_thread_t *      p_input;  /**< the input thread associated
                                      * with the current item */
diff --git a/src/playlist/services_discovery.c b/src/playlist/services_discovery.c
index ab69fb5..5cc6f30 100644
--- a/src/playlist/services_discovery.c
+++ b/src/playlist/services_discovery.c
@@ -289,6 +289,7 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist, const char *psz_modul
     p_sds->p_sd = p_sd;
     p_sds->p_one = p_one;
     p_sds->p_cat = p_cat;
+    p_sds->psz_name = strdup( psz_module );
 
     PL_LOCK;
     TAB_APPEND( pl_priv(p_playlist)->i_sds, pl_priv(p_playlist)->pp_sds, p_sds );
@@ -357,6 +358,7 @@ int playlist_ServicesDiscoveryRemove( playlist_t * p_playlist,
     PL_UNLOCK;
 
     vlc_sd_Destroy( p_sd );
+    free( p_sds->psz_name );
     free( p_sds );
 
     return VLC_SUCCESS;




More information about the vlc-devel mailing list