Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
ba3d99e9
Commit
ba3d99e9
authored
Oct 24, 2006
by
Christophe Mutricy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
honor xml:base
parent
c26e07cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+22
-0
No files found.
modules/demux/playlist/xspf.c
View file @
ba3d99e9
...
...
@@ -43,6 +43,7 @@ struct demux_sys_t
input_item_t
**
pp_tracklist
;
int
i_tracklist_entries
;
int
i_identifier
;
char
*
psz_base
;
};
static
int
Control
(
demux_t
*
,
int
,
va_list
);
...
...
@@ -61,6 +62,7 @@ int E_(Import_xspf)( vlc_object_t *p_this )
void
E_
(
Close_xspf
)(
vlc_object_t
*
p_this
)
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
FREENULL
(
p_demux
->
p_sys
->
psz_base
);
free
(
p_demux
->
p_sys
);
}
...
...
@@ -79,6 +81,7 @@ int Demux( demux_t *p_demux )
p_demux
->
p_sys
->
pp_tracklist
=
NULL
;
p_demux
->
p_sys
->
i_tracklist_entries
=
0
;
p_demux
->
p_sys
->
i_identifier
=
-
1
;
p_demux
->
p_sys
->
psz_base
=
NULL
;
/* create new xml parser from stream */
p_xml
=
xml_Create
(
p_demux
);
...
...
@@ -188,6 +191,10 @@ static vlc_bool_t parse_playlist_node COMPLEX_INTERFACE
/* attribute: xmlns */
else
if
(
!
strcmp
(
psz_name
,
"xmlns"
)
)
;
else
if
(
!
strcmp
(
psz_name
,
"xml:base"
)
)
{
p_demux
->
p_sys
->
psz_base
=
decode_URI_duplicate
(
psz_value
);
}
/* unknown attribute */
else
msg_Warn
(
p_demux
,
"invalid <playlist> attribute:
\"
%s
\"
"
,
psz_name
);
...
...
@@ -526,6 +533,21 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
if
(
psz_uri
)
{
if
(
!
strstr
(
psz_uri
,
"://"
)
)
{
char
*
psz_tmp
=
malloc
(
strlen
(
p_demux
->
p_sys
->
psz_base
)
+
strlen
(
psz_uri
)
+
1
);
if
(
!
psz_tmp
)
{
msg_Err
(
p_demux
,
"out of memory"
);
return
ENOMEM
;
}
sprintf
(
psz_tmp
,
"%s%s"
,
p_demux
->
p_sys
->
psz_base
,
psz_uri
);
free
(
psz_uri
);
psz_uri
=
psz_tmp
;
}
p_new_input
=
input_ItemNewExt
(
p_playlist
,
psz_uri
,
NULL
,
0
,
NULL
,
-
1
);
p_new_input
->
p_meta
=
vlc_meta_New
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment