break;
case CACA_EVENT_QUIT:
{
- p_playlist = pl_Yield( p_vout );
- playlist_Stop( p_playlist );
- vlc_object_release( p_playlist );
+ p_playlist = vlc_object_find( p_vout,
+ VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ if( p_playlist )
+ {
+ playlist_Stop( p_playlist );
+ vlc_object_release( p_playlist );
+ }
vlc_object_kill( p_vout->p_libvlc );
break;
}
{
playlist_t *p_playlist;
- p_playlist = pl_Yield( p_this );
- /* Modify playlist as well because the vout might have to be
- * restarted */
- var_Create( p_playlist, "directx-wallpaper", VLC_VAR_BOOL );
- var_Set( p_playlist, "directx-wallpaper", newval );
- vlc_object_release( p_playlist );
+ p_playlist = vlc_object_find( p_this,
+ VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ if( p_playlist )
+ {
+ /* Modify playlist as well because the vout might have to be
+ * restarted */
+ var_Create( p_playlist, "directx-wallpaper", VLC_VAR_BOOL );
+ var_Set( p_playlist, "directx-wallpaper", newval );
+ vlc_object_release( p_playlist );
+ }
p_vout->p_sys->i_changes |= DX_WALLPAPER_CHANGE;
}
static void DirectXPopupMenu( event_thread_t *p_event, bool b_open )
{
- playlist_t *p_playlist = pl_Yield( p_event );
- vlc_value_t val;
- val.b_bool = b_open;
- var_Set( p_playlist, "intf-popupmenu", val );
- vlc_object_release( p_playlist );
+ playlist_t *p_playlist = vlc_object_find( p_event,
+ VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ if( p_playlist )
+ {
+ vlc_value_t val;
+ val.b_bool = b_open;
+ var_Set( p_playlist, "intf-popupmenu", val );
+ vlc_object_release( p_playlist );
+ }
}
static int DirectXConvertKey( int i_key );
/* the user wants to close the window */
case WM_CLOSE:
{
- playlist_t * p_playlist = pl_Yield( p_vout );
- playlist_Stop( p_playlist );
- vlc_object_release( p_playlist );
+ playlist_t * p_playlist = vlc_object_find( p_vout,
+ VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ if( p_playlist )
+ {
+ playlist_Stop( p_playlist );
+ vlc_object_release( p_playlist );
+ }
return 0;
}