]> git.sesse.net Git - vlc/blobdiff - modules/gui/wince/timer.cpp
Use pl_Yield and pl_Release instead of vlc_object_find.
[vlc] / modules / gui / wince / timer.cpp
index 5047f0cc4e9835be9cfdbb06313e70ca5ebcf66b..df58e803b089b9556a017124096f024172171b3e 100644 (file)
@@ -52,13 +52,11 @@ Timer::Timer( intf_thread_t *_p_intf, HWND hwnd, Interface *_p_main_interface)
     i_old_rate = INPUT_RATE_DEFAULT;
 
     /* 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 );
     }
 
     SetTimer( hwnd, 1, 200 /*milliseconds*/, NULL );
@@ -67,13 +65,11 @@ Timer::Timer( intf_thread_t *_p_intf, HWND hwnd, Interface *_p_main_interface)
 Timer::~Timer()
 {
     /* 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 );
     }
 }