#endif
/* Main loop */
- while( !p_intf->b_die )
+ while( vlc_object_alive (p_intf) )
{
/* if video output is dying, disassociate ourselves from it */
- if( p_vout && p_vout->b_die )
+ if( p_vout && !vlc_object_alive (p_vout) )
{
var_DelCallback( p_vout, "mouse-clicked", MouseEvent, p_intf );
vlc_object_release( p_vout );
static int InitThread( intf_thread_t * p_intf )
{
/* We might need some locking here */
- if( !p_intf->b_die )
+ if( vlc_object_alive (p_intf) )
{
input_thread_t * p_input;
decoder_t *p_cmml_decoder;
mtime_t i_seconds;
vlc_value_t time;
- p_playlist = (playlist_t *) vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
- if ( !p_playlist )
- {
- msg_Warn( p_intf, "can't find playlist" );
- return;
- }
+ p_playlist = pl_Yield( p_intf );
/* Get new URL */
p_current_item = p_playlist->status.p_item;
msg_Dbg( p_intf, "calling browser_Open with \"%s\"", psz_url );
#endif
(void) browser_Open( psz_url );
- playlist_Control( p_playlist, PLAYLIST_PAUSE, true, 0 );
+ playlist_Control( p_playlist, PLAYLIST_PAUSE, false, 0 );
}
free( psz_uri_to_load );
#endif
/* Find the playlist */
- p_playlist = (playlist_t *) vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
- if ( !p_playlist )
- {
- msg_Warn( p_intf, "can't find playlist" );
- return;
- }
+ p_playlist = pl_Yield( p_intf );
/* Retrieve navigation history from playlist */
if( var_Get( p_playlist, "navigation-history", &history ) != VLC_SUCCESS ||
#endif
/* Find the playlist */
- p_playlist = (playlist_t *) vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
- if ( !p_playlist )
- {
- msg_Warn( p_intf, "can't find playlist" );
- return;
- }
+ p_playlist = pl_Yield( p_intf );
/* Retrieve navigation history from playlist */
if( var_Get( p_playlist, "navigation-history", &history ) != VLC_SUCCESS ||