]> git.sesse.net Git - vlc/commitdiff
media library loading: remove "meta-file" input option from subitems
authorRafaël Carré <funman@videolan.org>
Sun, 7 Oct 2007 21:20:30 +0000 (21:20 +0000)
committerRafaël Carré <funman@videolan.org>
Sun, 7 Oct 2007 21:20:30 +0000 (21:20 +0000)
src/playlist/loadsave.c

index 4fb29536676de79c63f2e2dae1fc8746b64da9d3..e4a327c5b7fb760ae6d7c7faa6a7e10e6ec77fd3 100644 (file)
@@ -96,6 +96,12 @@ static void input_item_subitem_added( const vlc_event_t * p_event,
 {
     playlist_t *p_playlist = user_data;
     input_item_t *p_item = p_event->u.input_item_subitem_added.p_new_child;
+
+    /* The media library input has one and only one option: "meta-file"
+     * So we remove that unneeded option. */
+    free( p_item->ppsz_options[0] );
+    p_item->i_options = 0;
+
     playlist_AddInput( p_playlist, p_item, PLAYLIST_APPEND, PLAYLIST_END,
             VLC_FALSE, VLC_FALSE );
 }
@@ -135,6 +141,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
     }
 
     const char *const psz_option = "meta-file";
+    /* that option has to be cleaned in input_item_subitem_added() */
     p_input = input_ItemNewExt( p_playlist, psz_uri,
                                 _("Media Library"), 1, &psz_option, -1 );
     if( p_input == NULL )