]> git.sesse.net Git - vlc/commitdiff
Do not inherit xspf-open demux from media library
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 23 Jun 2009 20:08:28 +0000 (23:08 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 23 Jun 2009 20:08:28 +0000 (23:08 +0300)
src/playlist/loadsave.c

index 80abaada435210ec905c84d0d0b90da6dccf51e7..34378730761e03e6e9bf0046f938d27a3f89b2df 100644 (file)
@@ -148,18 +148,19 @@ int playlist_MLLoad( playlist_t *p_playlist )
     if( psz_datadir == NULL )
         return VLC_EGENERIC;
 
-    if( asprintf( &psz_uri, "%s/ml.xspf", psz_datadir ) == -1 )
+    /* Force XSPF demux (psz_datadir was a path, now it is a file URI) */
+    if( asprintf( &psz_uri, "file/xspf-open%s/ml.xspf", psz_datadir+4 ) == -1 )
         psz_uri = NULL;
     free( psz_datadir );
     psz_datadir = NULL;
     if( psz_uri == NULL )
         return VLC_ENOMEM;
 
-    const char *const options[] = { "meta-file", "demux=xspf-open" };
+    const char *const options[1] = { "meta-file", };
     /* that option has to be cleaned in input_item_subitem_added() */
     /* vlc_gc_decref() in the same function */
     p_input = input_item_NewExt( p_playlist, psz_uri, _("Media Library"),
-                                 2, options, VLC_INPUT_OPTION_TRUSTED, -1 );
+                                 1, options, VLC_INPUT_OPTION_TRUSTED, -1 );
     free( psz_uri );
     if( p_input == NULL )
         return VLC_EGENERIC;