[vlc-commits] demux: playlist: fix base url in metas
Francois Cartegnie
git at videolan.org
Mon Feb 19 18:25:08 CET 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb 19 18:13:30 2018 +0100| [7ada256b0e303d4abc7f678f96507ee327de4197] | committer: Francois Cartegnie
demux: playlist: fix base url in metas
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7ada256b0e303d4abc7f678f96507ee327de4197
---
modules/demux/playlist/xspf.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index dc4c105d9a..94816075b6 100644
--- a/modules/demux/playlist/xspf.c
+++ b/modules/demux/playlist/xspf.c
@@ -508,7 +508,8 @@ static bool parse_track_node COMPLEX_INTERFACE
*/
static bool set_item_info SIMPLE_INTERFACE
{
- VLC_UNUSED(opaque);
+ xspf_sys_t *p_sys = (xspf_sys_t *) opaque;
+
/* exit if setting is impossible */
if (!psz_name || !psz_value || !p_input)
return false;
@@ -529,9 +530,19 @@ static bool set_item_info SIMPLE_INTERFACE
else if (!strcmp(psz_name, "annotation"))
input_item_SetDescription(p_input, psz_value);
else if (!strcmp(psz_name, "info"))
- input_item_SetURL(p_input, psz_value);
+ {
+ char *psz_mrl = ProcessMRL( psz_value, p_sys->psz_base );
+ if( psz_mrl )
+ input_item_SetURL(p_input, psz_mrl);
+ free( psz_mrl );
+ }
else if (!strcmp(psz_name, "image") && *psz_value)
- input_item_SetArtURL(p_input, psz_value);
+ {
+ char *psz_mrl = ProcessMRL( psz_value, p_sys->psz_base );
+ if( psz_mrl )
+ input_item_SetArtURL(p_input, psz_mrl);
+ free( psz_mrl );
+ }
return true;
}
More information about the vlc-commits
mailing list