From 8cc57c7a80f9875ab3f6cf56f6e9df9a88177f3b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Tue, 13 Nov 2007 23:28:22 +0000 Subject: [PATCH] xspf: fix nodes encoding. big up to yoannp for fully nested xspf ! --- modules/demux/playlist/xspf.c | 9 ++++----- modules/misc/playlist/xspf.c | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c index 4565780c4f..e2c1c92fcd 100644 --- a/modules/demux/playlist/xspf.c +++ b/modules/demux/playlist/xspf.c @@ -635,7 +635,7 @@ static vlc_bool_t set_item_info SIMPLE_INTERFACE } else if( !strcmp( psz_name, "image" ) ) { - const char *psz_uri = decode_URI_duplicate( psz_value ); + char *psz_uri = decode_URI_duplicate( psz_value ); input_item_SetArtURL( p_input, psz_uri ); free( psz_uri ); } @@ -676,7 +676,7 @@ static vlc_bool_t parse_extension_node COMPLEX_INTERFACE /* attribute: title */ if( !strcmp( psz_name, "title" ) ) { - psz_title = unescape_URI_duplicate( psz_value ); + psz_title = decode_URI_duplicate( psz_value ); } /* extension attribute: application */ else if( !strcmp( psz_name, "application" ) ) @@ -698,9 +698,8 @@ static vlc_bool_t parse_extension_node COMPLEX_INTERFACE msg_Warn( p_demux, " requires \"title\" attribute" ); return VLC_FALSE; } - - p_new_input = input_ItemNewWithType( p_playlist, "", psz_title, - 0, NULL, -1, ITEM_TYPE_DIRECTORY ); + p_new_input = input_ItemNewWithType( VLC_OBJECT( p_playlist ), "", + psz_title, 0, NULL, -1, ITEM_TYPE_DIRECTORY ); if( p_new_input ) { input_ItemAddSubItem( p_input_item, p_new_input ); diff --git a/modules/misc/playlist/xspf.c b/modules/misc/playlist/xspf.c index d2bbc8e594..2a3bc2252d 100644 --- a/modules/misc/playlist/xspf.c +++ b/modules/misc/playlist/xspf.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include "xspf.h" @@ -250,7 +251,7 @@ static void xspf_extension_item( playlist_item_t *p_item, FILE *p_file, { int i; char *psz_temp; - psz_temp = convert_xml_special_chars( p_item->p_input->psz_name ); + psz_temp = encode_URI_component( p_item->p_input->psz_name ); fprintf( p_file, "\t\t\n", *psz_temp ? psz_temp : "" ); free( psz_temp ); -- 2.39.2