p_sys->p_node, PLAYLIST_APPEND,
PLAYLIST_END );
- p_sys->p_input = input_CreateThread( p_playlist, &p_item->input );
/* We need to declare the parents of the node as the same of the
* parent's ones */
playlist_CopyParents( p_sys->p_node, p_item );
+
+ p_sys->p_input = input_CreateThread( p_playlist, &p_item->input );
+
p_sys->p_node->i_flags |= PLAYLIST_RO_FLAG;
val.b_bool = VLC_TRUE;
var_Set( p_playlist, "intf-change", val );
services_discovery_sys_t *p_sys = p_sd->p_sys;
playlist_t *p_playlist = (playlist_t *) vlc_object_find( p_sd,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
- if( p_playlist )
- {
- playlist_NodeDelete( p_playlist, p_sys->p_node, VLC_TRUE, VLC_TRUE );
- vlc_object_release( p_playlist );
- }
if( p_sd->p_sys->p_input )
{
input_StopThread( p_sd->p_sys->p_input );
vlc_object_destroy( p_sd->p_sys->p_input );
p_sd->p_sys->p_input = NULL;
}
+ if( p_playlist )
+ {
+ playlist_NodeDelete( p_playlist, p_sys->p_node, VLC_TRUE, VLC_TRUE );
+ vlc_object_release( p_playlist );
+ }
free( p_sys );
}