# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_playlist.h>
p_sys->p_playlist = pl_Yield( p_sd );
/* Create our playlist node */
+ vlc_object_lock( p_sys->p_playlist );
playlist_NodesPairCreate( pl_Get( p_sd ), _("Devices"),
&p_sys->p_node_cat, &p_sys->p_node_one,
true );
+ vlc_object_unlock( p_sys->p_playlist );
return VLC_SUCCESS;
}
}
msg_Dbg( p_sd, "UPnP discovery started" );
- while( !p_sd->b_die )
+ while( vlc_object_alive (p_sd) )
{
msleep( 500 );
}
/* FIXME: playlist_AddInput() can fail */
playlist_BothAddInput( p_playlist, p_input, parentNode,
PLAYLIST_APPEND, PLAYLIST_END, &i_cat, NULL,
- false );
+ pl_Unlocked );
vlc_gc_decref( p_input );
/* TODO: do this better by storing ids */
playlist_item_t *p_node = playlist_ItemGetById( p_playlist, i_cat, false );