var_CreateGetBool( p_playlist, "loop" );
/* Initialise data structures */
+ vlc_mutex_init( p_playlist, &p_playlist->gc_lock );
p_playlist->i_last_id = 0;
p_playlist->b_go_next = VLC_TRUE;
p_playlist->p_input = NULL;
p_view = playlist_ViewFind( p_playlist, VIEW_CATEGORY );
- p_playlist->p_general = playlist_NodeCreate( p_playlist, VIEW_CATEGORY,
- _( "General" ), p_view->p_root );
+ p_playlist->p_general =
+ playlist_NodeCreate( p_playlist, VIEW_CATEGORY,
+ _( "General" ), p_view->p_root );
p_playlist->p_general->i_flags |= PLAYLIST_RO_FLAG;
/* Set startup status
free( p_view );
}
+ vlc_mutex_destroy( &p_playlist->gc_lock );
vlc_object_destroy( p_playlist->p_preparse );
vlc_object_destroy( p_playlist );
}
else
{
+ vlc_mutex_lock( &p_playlist->gc_lock );
while( ( p_obj = vlc_object_find( p_playlist, i_type, FIND_CHILD ) ) )
{
if( p_obj->p_parent != (vlc_object_t*)p_playlist )
sout_DeleteInstance( (sout_instance_t*)p_obj );
}
}
+ vlc_mutex_unlock( &p_playlist->gc_lock );
return 0;
}
}
#include "video_output.h"
#include "vlc_spu.h"
#include <vlc/input.h> /* for input_thread_t and i_pts_delay */
+#include "vlc_playlist.h"
#if defined( SYS_DARWIN )
#include "darwin_specific.h"
if( !p_vout )
{
- vlc_object_t *p_playlist;
+ playlist_t *p_playlist;
p_playlist = vlc_object_find( p_this,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist )
{
+ vlc_mutex_lock( &p_playlist->gc_lock );
p_vout = vlc_object_find( p_playlist,
VLC_OBJECT_VOUT, FIND_CHILD );
/* only first children of p_input for unused vout */
vlc_object_release( p_vout );
p_vout = NULL;
}
+ vlc_mutex_unlock( &p_playlist->gc_lock );
vlc_object_release( p_playlist );
}
}