static void DirectXPopupMenu( event_thread_t *p_event, bool b_open )
{
- playlist_t *p_playlist =
- vlc_object_find( p_event, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
- if( p_playlist != NULL )
- {
- 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 = 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 );
}
static int DirectXConvertKey( int i_key );
/* the user wants to close the window */
case WM_CLOSE:
{
- playlist_t * p_playlist =
- (playlist_t *)vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist == NULL )
- {
- return 0;
- }
-
+ playlist_t * p_playlist = pl_Yield( p_vout );
playlist_Stop( p_playlist );
vlc_object_release( p_playlist );
return 0;