]> git.sesse.net Git - vlc/blobdiff - projects/macosx/framework/Sources/VLCMediaPlayer.m
macosx/framework: VLCAudio now use a media_player. Cool.
[vlc] / projects / macosx / framework / Sources / VLCMediaPlayer.m
index 2359600a22c7849144d1efc153b684acb13994e3..05b641fa8fb86b434fb9a766e402612ccae4769c 100644 (file)
@@ -225,6 +225,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
     [cachedTime release];
     [cachedRemainingTime release];
     [drawable release];
+    [audio release];
 
     [super dealloc];
 }
@@ -262,7 +263,9 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
 
 - (VLCAudio *)audio
 {
-    return [[VLCLibrary sharedLibrary] audio];
+    if (!audio)
+        audio = [[VLCAudio alloc] initWithMediaPlayer:self];
+    return audio;
 }
 
 #pragma mark -