]> git.sesse.net Git - vlc/commitdiff
Make sure we don't use the deprecated get_drawable(), by using get_nsobject().
authorPierre d'Herbemont <pdherbemont@free.fr>
Mon, 3 Aug 2009 01:19:40 +0000 (18:19 -0700)
committerPierre d'Herbemont <pdherbemont@free.fr>
Tue, 18 Aug 2009 10:14:44 +0000 (12:14 +0200)
And remove a few unnecessary casts.

projects/macosx/framework/Sources/VLCMediaPlayer.m

index be11560c8b8803ea418aa0265253c357822e7fa3..7045604ddc9f713c398a231d2f07aaae5b007ceb 100644 (file)
@@ -223,9 +223,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
     // Make sure that this instance has been associated with the drawing canvas.
     libvlc_exception_t ex;
     libvlc_exception_init( &ex );
-    libvlc_media_player_set_nsobject ((libvlc_media_player_t *)instance, 
-                                        aDrawable, 
-                                        &ex);
+    libvlc_media_player_set_nsobject(instance, aDrawable, &ex);
     catch_exception( &ex );
 }
 
@@ -233,10 +231,9 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
 {
     libvlc_exception_t ex;
     libvlc_exception_init( &ex );
-    libvlc_drawable_t ret = libvlc_media_player_get_drawable ((libvlc_media_player_t *)instance, 
-                                        &ex);
+    id ret = libvlc_media_player_get_nsobject(instance);
     catch_exception( &ex );
-    return (id)ret;
+    return ret;
 }
 
 - (VLCAudio *)audio