Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
b1580c14
Commit
b1580c14
authored
May 28, 2006
by
hartman
Browse files
this patch allows xml comments directly before the root node. Patch by Daniel Stranger.
parent
4e3a00fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/demux/playlist/xspf.c
View file @
b1580c14
...
...
@@ -88,30 +88,25 @@ int xspf_import_Demux( demux_t *p_demux )
i_ret
=
VLC_EGENERIC
;
}
/* start with parsing the root node */
if
(
i_ret
==
VLC_SUCCESS
)
/* locating the root node */
while
(
i_ret
==
VLC_SUCCESS
&&
xml_ReaderNodeType
(
p_xml_reader
)
!=
XML_READER_STARTELEM
)
if
(
xml_ReaderRead
(
p_xml_reader
)
!=
1
)
{
msg_Err
(
p_demux
,
"can't read xml stream"
);
i_ret
=
VLC_EGENERIC
;
}
/* checking root node
typ
e */
/* checking root node
nam
e */
if
(
i_ret
==
VLC_SUCCESS
)
if
(
xml_ReaderNodeType
(
p_xml_reader
)
!=
XML_READER_STARTELEM
)
{
psz_name
=
xml_ReaderName
(
p_xml_reader
);
if
(
!
psz_name
||
strcmp
(
psz_name
,
"playlist"
)
)
{
msg_Err
(
p_demux
,
"invalid root node type: %i"
,
xml_ReaderNodeType
(
p_xml_reader
)
);
msg_Err
(
p_demux
,
"invalid root node name: %s"
,
psz_name
);
i_ret
=
VLC_EGENERIC
;
}
/* checking root node name */
if
(
i_ret
==
VLC_SUCCESS
)
psz_name
=
xml_ReaderName
(
p_xml_reader
);
if
(
!
psz_name
||
strcmp
(
psz_name
,
"playlist"
)
)
{
msg_Err
(
p_demux
,
"invalid root node name: %s"
,
psz_name
);
i_ret
=
VLC_EGENERIC
;
FREE_NAME
();
}
FREE_NAME
();
i_ret
=
parse_playlist_node
(
p_demux
,
p_playlist
,
p_current
,
NULL
,
p_xml_reader
,
"playlist"
);
...
...
@@ -135,7 +130,8 @@ int xspf_import_Control( demux_t *p_demux, int i_query, va_list args )
* \brief parse the root node of a XSPF playlist
* \param p_demux demuxer instance
* \param p_playlist playlist instance
* \param p_item current playlist node
* \param p_item current playlist item
* \param p_input current input item
* \param p_xml_reader xml reader instance
* \param psz_element name of element to parse
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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