[vlc-devel] commit: macosx/framework: Set root media after setting the playlist. ( Pierre d'Herbemont )
git version control
git at videolan.org
Sun Aug 30 12:53:39 CEST 2009
vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Sun Aug 30 12:52:57 2009 +0200| [8152b0d8befba6a40500c997f3fd917ebdde4df2] | committer: Pierre d'Herbemont
macosx/framework: Set root media after setting the playlist.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8152b0d8befba6a40500c997f3fd917ebdde4df2
---
.../macosx/framework/Sources/VLCMediaListPlayer.m | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/projects/macosx/framework/Sources/VLCMediaListPlayer.m b/projects/macosx/framework/Sources/VLCMediaListPlayer.m
index 14be70d..0d9c62c 100644
--- a/projects/macosx/framework/Sources/VLCMediaListPlayer.m
+++ b/projects/macosx/framework/Sources/VLCMediaListPlayer.m
@@ -68,11 +68,18 @@
if (_rootMedia == media)
return;
[_rootMedia release];
- _rootMedia = [media retain];
+ _rootMedia = nil;
+
VLCMediaList *mediaList = [[VLCMediaList alloc] init];
if (media)
[mediaList addMedia:media];
+
+ // This will clean rootMedia
[self setMediaList:mediaList];
+
+ // Thus set rootMedia here.
+ _rootMedia = [media retain];
+
[mediaList release];
}
More information about the vlc-devel
mailing list