[vlc-devel] commit: playlist_Import: use make_URI ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Jun 23 21:38:24 CEST 2009


vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Tue Jun 23 21:50:32 2009 +0300| [059bfafb9ff76289de21e40efcdbf38294a08df9] | committer: Derk-Jan Hartman 

playlist_Import: use make_URI
(cherry picked from commit 7521a562a2fa3213c1c056d0118301d9268ee194)

Signed-off-by: Derk-Jan Hartman <hartman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=059bfafb9ff76289de21e40efcdbf38294a08df9
---

 src/playlist/loadsave.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/playlist/loadsave.c b/src/playlist/loadsave.c
index e7bbec2..5de646a 100644
--- a/src/playlist/loadsave.c
+++ b/src/playlist/loadsave.c
@@ -30,6 +30,7 @@
 #include "playlist_internal.h"
 #include "config/configuration.h"
 #include <vlc_charset.h>
+#include <vlc_url.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -82,10 +83,10 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
 int playlist_Import( playlist_t *p_playlist, const char *psz_file )
 {
     input_item_t *p_input;
-    char *psz_uri;
     const char *const psz_option = "meta-file";
+    char *psz_uri = make_URI( psz_file );
 
-    if( asprintf( &psz_uri, "file/://%s", psz_file ) < 0 )
+    if( psz_uri == NULL )
         return VLC_EGENERIC;
 
     p_input = input_item_NewExt( p_playlist, psz_uri, psz_file,




More information about the vlc-devel mailing list