Commit a89b5ff6 authored by Felix Paul Kühne's avatar Felix Paul Kühne

VLCMediaListPlayer: use the media player's VLCLibrary as the shared instance...

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
parent 1104e614
...@@ -38,3 +38,5 @@ ...@@ -38,3 +38,5 @@
@class VLCVideoView; @class VLCVideoView;
@class VLCAudio; @class VLCAudio;
@class VLCMediaThumbnailer; @class VLCMediaThumbnailer;
@class VLCMediaListPlayer;
@class VLCMediaPlayer;
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
if (self = [super init]) { if (self = [super init]) {
_mediaPlayer = [[VLCMediaPlayer alloc] initWithOptions:options]; _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]); libvlc_media_list_player_set_media_player(instance, [_mediaPlayer libVLCMediaPlayer]);
} }
return self; return self;
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
- (void)dealloc - (void)dealloc
{ {
[_mediaPlayer stop];
libvlc_media_list_player_release(instance); libvlc_media_list_player_release(instance);
[_mediaPlayer release]; [_mediaPlayer release];
[_rootMedia release]; [_rootMedia release];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment