summaryrefslogtreecommitdiff
path: root/src/spu_dec/cmml_decoder.c
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2009-11-05 15:06:18 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2009-11-05 15:06:18 +0000
commitca2c9c30b5a0f0fcab1ffb52bd065e335ffd4afe (patch)
treee43b190684d36f5ec7c4c089aec4dc42f48714f0 /src/spu_dec/cmml_decoder.c
parentcf86264961e27b47d57981bddb98364947ba7018 (diff)
parent2af40655557ffc8197e3e59b9428168c2454a68b (diff)
downloadxine-lib-ca2c9c30b5a0f0fcab1ffb52bd065e335ffd4afe.tar.gz
xine-lib-ca2c9c30b5a0f0fcab1ffb52bd065e335ffd4afe.tar.bz2
Merge from 1.1 (with adaptations).
--HG-- rename : src/xine-engine/scratch.h => include/xine/scratch.h rename : src/xine-utils/xmllexer.h => include/xine/xmllexer.h rename : src/xine-utils/xmlparser.h => include/xine/xmlparser.h rename : src/libspucmml/xine_cmml_decoder.c => src/spu_dec/cmml_decoder.c rename : src/libspuhdmv/xine_hdmv_decoder.c => src/spu_dec/spuhdmv_decoder.c
Diffstat (limited to 'src/spu_dec/cmml_decoder.c')
-rw-r--r--src/spu_dec/cmml_decoder.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/spu_dec/cmml_decoder.c b/src/spu_dec/cmml_decoder.c
index 7f800cf20..02ef18540 100644
--- a/src/spu_dec/cmml_decoder.c
+++ b/src/spu_dec/cmml_decoder.c
@@ -239,6 +239,7 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
spucmml_decoder_t *this = (spucmml_decoder_t *) this_gen;
+ xml_parser_t *xml_parser;
xml_node_t *packet_xml_root;
char * anchor_text = NULL;
@@ -248,12 +249,15 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
/* parse the CMML */
- xml_parser_init (str, strlen (str), XML_PARSER_CASE_INSENSITIVE);
- if (xml_parser_build_tree(&packet_xml_root) != XML_PARSER_OK) {
+ xml_parser = xml_parser_init_r (str, strlen (str), XML_PARSER_CASE_INSENSITIVE);
+ if (xml_parser_build_tree_r(xml_parser, &packet_xml_root) != XML_PARSER_OK) {
lprintf ("warning: invalid XML packet detected in CMML track\n");
+ xml_parser_finalize_r(xml_parser);
return;
}
+ xml_parser_finalize_r(xml_parser);
+
if (strcasecmp(packet_xml_root->name, "head") == 0) {
/* found a <head>...</head> packet: need to parse the title */