- const char *psz_next = strchr( psz_parser, ':' );
- if( psz_next == NULL )
- psz_next = psz_parser + strlen( psz_parser );
-
- char psz_plugin[psz_next - psz_parser + 1];
- memcpy (psz_plugin, psz_parser, sizeof (psz_plugin) - 1);
- psz_plugin[sizeof (psz_plugin) - 1] = '\0';
- psz_parser = psz_next;
-
- /* Perform the addition */
- msg_Dbg( p_playlist, "Add services_discovery %s", psz_plugin );
- services_discovery_t *p_sd;
-
- p_sd = vlc_sd_Create( (vlc_object_t*)p_playlist );
- if( !p_sd )
- continue;
-
- vlc_event_attach( services_discovery_EventManager( p_sd ),
- vlc_ServicesDiscoveryItemAdded,
- playlist_sd_item_added,
- p_one );
-
- vlc_event_attach( services_discovery_EventManager( p_sd ),
- vlc_ServicesDiscoveryItemAdded,
- playlist_sd_item_added,
- p_cat );
-
- vlc_event_attach( services_discovery_EventManager( p_sd ),
- vlc_ServicesDiscoveryItemRemoved,
- playlist_sd_item_removed,
- p_one );
-
- vlc_event_attach( services_discovery_EventManager( p_sd ),
- vlc_ServicesDiscoveryItemRemoved,
- playlist_sd_item_removed,
- p_cat );
-
- if( !vlc_sd_Start( p_sd, psz_plugin ) )