libvlc: do not assume playlist exists when preparsing
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 21 Aug 2012 17:56:23 +0000 (20:56 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 21 Aug 2012 18:31:53 +0000 (21:31 +0300)
This could crash. The playlist needs to be started (at least until
someone resolves bug #5460).

lib/media.c

index fc32c67..600e10a 100644 (file)
@@ -591,8 +591,8 @@ libvlc_media_get_duration( libvlc_media_t * p_md )
 static int media_parse(libvlc_media_t *media)
 {
     /* TODO: fetcher and parser independent of playlist */
-    playlist_t *playlist =
-        libvlc_priv (media->p_libvlc_instance->p_libvlc_int)->p_playlist;
+#warning FIXME: remove pl_Get
+    playlist_t *playlist = pl_Get(media->p_libvlc_instance->p_libvlc_int);
 
     /* TODO: Fetch art on need basis. But how not to break compatibility? */
     playlist_AskForArtEnqueue(playlist, media->p_input_item );