]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/timer.cpp
Replace vlc_object_find() and vlc_object_release() of VLC_OBJECT_PLAYLIST with pl_Yie...
[vlc] / modules / gui / wxwidgets / timer.cpp
index 897476536f4adf0ebaa8a8ad76a01ce77d917594..b9f4e0e0ad21da4cc53acac0cd34782c37b43ff5 100644 (file)
@@ -49,13 +49,11 @@ Timer::Timer( intf_thread_t *_p_intf, Interface *_p_main_interface )
     var_AddCallback( p_intf->p_libvlc, "intf-show", IntfShowCB, p_intf );
 
     /* Register callback for the intf-popupmenu variable */
-    playlist_t *p_playlist =
-        (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
-                                       FIND_ANYWHERE );
+    playlist_t *p_playlist = pl_Yield( p_intf );
     if( p_playlist != NULL )
     {
         var_AddCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
-        vlc_object_release( p_playlist );
+        pl_Release( p_playlist );
     }
 
     Start( 100 /*milliseconds*/, wxTIMER_CONTINUOUS );
@@ -66,13 +64,11 @@ Timer::~Timer()
     var_DelCallback( p_intf->p_libvlc, "intf-show", IntfShowCB, p_intf );
 
     /* Unregister callback */
-    playlist_t *p_playlist =
-        (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
-                                       FIND_ANYWHERE );
+    playlist_t *p_playlist = pl_Yield( p_intf );
     if( p_playlist != NULL )
     {
         var_DelCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
-        vlc_object_release( p_playlist );
+        pl_Release( p_playlist );
     }
 }