Commit c99697b2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

playlist: pass base URL rather than filename to exporter

(The filename is not used by any plugin at the moment.)
parent 685434ec
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment