libvlc: add SD plugins one by one
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 10 Jan 2009 18:28:51 +0000 (20:28 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 10 Jan 2009 18:28:51 +0000 (20:28 +0200)
src/libvlc.c

index d6afbc0..c121244 100644 (file)
@@ -830,11 +830,13 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     playlist_Activate( p_playlist );
     vlc_object_attach( p_playlist, p_libvlc );
 
+    /* Add service discovery modules */
     psz_modules = config_GetPsz( p_playlist, "services-discovery" );
     if( psz_modules && *psz_modules )
     {
-        /* Add service discovery modules */
-        playlist_ServicesDiscoveryAdd( p_playlist, psz_modules );
+        char *p = psz_modules, *m;
+        while( ( m = strsep( &p, " :," ) ) != NULL )
+            playlist_ServicesDiscoveryAdd( p_playlist, m );
     }
     free( psz_modules );