Commit ca797b13 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Use pl_Yield instead of vlc_object_find

parent ddfce772
......@@ -223,14 +223,10 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
p_intf->b_interaction = true;
/* Register callback for the intf-popupmenu variable */
playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist != NULL )
{
playlist_t *p_playlist = pl_Yield( p_intf );
var_AddCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
var_AddCallback( p_playlist, "intf-show", IntfShowCB, p_intf );
vlc_object_release( p_playlist );
}
pl_Release( p_intf );
/* VideoWidget connect mess to avoid different threads speaking to each other */
CONNECT( this, askReleaseVideo( void * ),
......@@ -289,14 +285,10 @@ MainInterface::~MainInterface()
delete settings;
/* Unregister callback for the intf-popupmenu variable */
playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist != NULL )
{
playlist_t *p_playlist = pl_Yield( p_intf );
var_DelCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
var_DelCallback( p_playlist, "intf-show", IntfShowCB, p_intf );
vlc_object_release( p_playlist );
}
pl_Release( p_intf );
p_intf->b_interaction = false;
var_DelCallback( p_intf, "interaction", InteractCallback, this );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment