X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcontrol%2Fmedia_library.c;h=a85c1b92e333063f1c5d48f61124cb75732b8249;hb=8b524cb8b23f4acfb96c6a07b404c73615e5e6c2;hp=0a177f66be645f0744a1016a8ec1311d53cec4c6;hpb=6ee1e193fd896ab9a4729fde14f009d9ce629815;p=vlc diff --git a/src/control/media_library.c b/src/control/media_library.c index 0a177f66be..a85c1b92e3 100644 --- a/src/control/media_library.c +++ b/src/control/media_library.c @@ -1,6 +1,6 @@ /***************************************************************************** * tree.c: libvlc tags tree functions - * Create a tree of the 'tags' of a media_list's media_descriptors. + * Create a tree of the 'tags' of a media_list's medias. ***************************************************************************** * Copyright (C) 2007 the VideoLAN team * $Id$ @@ -23,6 +23,7 @@ *****************************************************************************/ #include "libvlc_internal.h" #include +#include "libvlc.h" #include "vlc_arrays.h" /* @@ -88,7 +89,7 @@ void libvlc_media_library_load( libvlc_media_library_t * p_mlib, libvlc_exception_t * p_e ) { - const char *psz_datadir = p_mlib->p_libvlc_instance->p_libvlc_int->psz_datadir; + char *psz_datadir = config_GetUserDataDir(); char * psz_uri; if( !psz_datadir ) /* XXX: i doubt that this can ever happen */ @@ -100,9 +101,11 @@ libvlc_media_library_load( libvlc_media_library_t * p_mlib, if( asprintf( &psz_uri, "file/xspf-open://%s" DIR_SEP "ml.xsp", psz_datadir ) == -1 ) { + free( psz_datadir ); libvlc_exception_raise( p_e, "Can't get create the path" ); return; } + free( psz_datadir ); if( p_mlib->p_mlist ) libvlc_media_list_release( p_mlib->p_mlist ); @@ -122,6 +125,7 @@ void libvlc_media_library_save( libvlc_media_library_t * p_mlib, libvlc_exception_t * p_e ) { + (void)p_mlib; libvlc_exception_raise( p_e, "Not supported" ); }