[vlc-commits] demux: playlist: xspf: check depth when skipping
Francois Cartegnie
git at videolan.org
Wed Sep 6 13:10:22 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Sep 6 09:56:01 2017 +0200| [b7f22b7873005ce26a9f1f94447365a2bde9e00d] | committer: Francois Cartegnie
demux: playlist: xspf: check depth when skipping
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b7f22b7873005ce26a9f1f94447365a2bde9e00d
---
modules/demux/playlist/xspf.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index af15cf16f0..2058c5b401 100644
--- a/modules/demux/playlist/xspf.c
+++ b/modules/demux/playlist/xspf.c
@@ -809,13 +809,13 @@ static bool parse_extitem_node COMPLEX_INTERFACE
static bool skip_element COMPLEX_INTERFACE
{
VLC_UNUSED(p_demux); VLC_UNUSED(p_input_node);
- VLC_UNUSED(psz_element);
if(b_empty_node)
return true;
+ const char *name;
for (unsigned lvl = 1; lvl;)
- switch (xml_ReaderNextNode(p_xml_reader, NULL))
+ switch (xml_ReaderNextNode(p_xml_reader, &name))
{
case XML_READER_STARTELEM:
{
@@ -824,6 +824,13 @@ static bool skip_element COMPLEX_INTERFACE
break;
}
case XML_READER_ENDELEM:
+ if(lvl == 0)
+ {
+ if(name && psz_element && strcmp(psz_element, name))
+ return false;
+ else
+ return true;
+ }
lvl--;
break;
case XML_READER_NONE:
More information about the vlc-commits
mailing list