summaryrefslogtreecommitdiff
path: root/src/demuxers
diff options
context:
space:
mode:
authorMatt Kraai <kraai@ftbfs.org>2009-10-15 22:01:24 +0100
committerMatt Kraai <kraai@ftbfs.org>2009-10-15 22:01:24 +0100
commit6efc8270ef8f75a842930a0f703cb3539f106d4b (patch)
tree441ef4577e24fe4dfef3ee823fbbf74f9920b2ab /src/demuxers
parent93d452a4570cf3f4dd81c6c2cab66aa604f39e05 (diff)
downloadxine-lib-6efc8270ef8f75a842930a0f703cb3539f106d4b.tar.gz
xine-lib-6efc8270ef8f75a842930a0f703cb3539f106d4b.tar.bz2
Make the XML lexer and parser re-entrant
Diffstat (limited to 'src/demuxers')
-rw-r--r--src/demuxers/demux_asf.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index d79782026..6c9ea631c 100644
--- a/src/demuxers/demux_asf.c
+++ b/src/demuxers/demux_asf.c
@@ -1544,6 +1544,7 @@ static int demux_asf_parse_asx_references( demux_asf_t *this) {
int buf_used = 0;
int len;
xml_node_t *xml_tree, *asx_entry, *asx_ref;
+ xml_parser_t *xml_parser;
int result;
@@ -1566,9 +1567,13 @@ static int demux_asf_parse_asx_references( demux_asf_t *this) {
if(buf_used)
buf[buf_used] = '\0';
- xml_parser_init(buf, buf_used, XML_PARSER_CASE_INSENSITIVE);
- if((result = xml_parser_build_tree(&xml_tree)) != XML_PARSER_OK)
+ xml_parser = xml_parser_init_r(buf, buf_used, XML_PARSER_CASE_INSENSITIVE);
+ if((result = xml_parser_build_tree_r(xml_parser, &xml_tree)) != XML_PARSER_OK) {
+ xml_parser_finalize_r(xml_parser);
goto failure;
+ }
+
+ xml_parser_finalize_r(xml_parser);
if(!strcasecmp(xml_tree->name, "ASX")) {
/* Attributes: VERSION, PREVIEWMODE, BANNERBAR