[vlc-commits] playlist: pass base URL rather than filename to exporter
Rémi Denis-Courmont
git at videolan.org
Wed Mar 1 19:17:03 CET 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Mar 1 19:55:44 2017 +0200| [c99697b2c5281ef9d8627b8d785dddc5d209cfcf] | committer: Rémi Denis-Courmont
playlist: pass base URL rather than filename to exporter
(The filename is not used by any plugin at the moment.)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c99697b2c5281ef9d8627b8d785dddc5d209cfcf
---
include/vlc_playlist.h | 2 +-
src/playlist/loadsave.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index 6d33d4f..b2adb3d 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -116,7 +116,7 @@ struct intf_thread_t;
typedef struct playlist_export_t
{
VLC_COMMON_MEMBERS
- const char *psz_filename;
+ char *base_url;
FILE *p_file;
playlist_item_t *p_root;
} playlist_export_t;
diff --git a/src/playlist/loadsave.c b/src/playlist/loadsave.c
index a3bb89d..9b0533b 100644
--- a/src/playlist/loadsave.c
+++ b/src/playlist/loadsave.c
@@ -52,7 +52,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename,
int ret = VLC_EGENERIC;
/* Prepare the playlist_export_t structure */
- p_export->psz_filename = psz_filename;
+ p_export->base_url = vlc_path2uri( psz_filename, NULL );
p_export->p_file = vlc_fopen( psz_filename, "wt" );
if( p_export->p_file == NULL )
{
@@ -84,6 +84,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename,
msg_Err( p_playlist, "could not export playlist" );
fclose( p_export->p_file );
out:
+ free( p_export->base_url );
vlc_object_release( p_export );
return ret;
}
More information about the vlc-commits
mailing list