Преглед на файлове

VLCMediaListPlayer: use the media player's VLCLibrary as the shared instance may not necessarily exist and if it does, the media player will return it

Felix Paul Kühne преди 11 години
родител
ревизия
a89b5ff611
променени са 2 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 2 0
      Headers/Public/MobileVLCKit.h
  2. 2 1
      Sources/VLCMediaListPlayer.m

+ 2 - 0
Headers/Public/MobileVLCKit.h

@@ -38,3 +38,5 @@
 @class VLCVideoView;
 @class VLCAudio;
 @class VLCMediaThumbnailer;
+@class VLCMediaListPlayer;
+@class VLCMediaPlayer;

+ 2 - 1
Sources/VLCMediaListPlayer.m

@@ -37,7 +37,7 @@
         if (self = [super init]) {
             _mediaPlayer = [[VLCMediaPlayer alloc] initWithOptions:options];
 
-            instance = libvlc_media_list_player_new([VLCLibrary sharedInstance]);
+            instance = libvlc_media_list_player_new([_mediaPlayer.libraryInstance instance]);
             libvlc_media_list_player_set_media_player(instance, [_mediaPlayer libVLCMediaPlayer]);
         }
         return self;
@@ -51,6 +51,7 @@
 
 - (void)dealloc
 {
+    [_mediaPlayer stop];
     libvlc_media_list_player_release(instance);
     [_mediaPlayer release];
     [_rootMedia release];