summaryrefslogtreecommitdiff
path: root/src/demuxers
diff options
context:
space:
mode:
Diffstat (limited to 'src/demuxers')
-rw-r--r--src/demuxers/demux_asf.c9
-rw-r--r--src/demuxers/demux_flac.c3
-rw-r--r--src/demuxers/demux_real.c3
3 files changed, 13 insertions, 2 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index 9d0447ce5..757e7ffd8 100644
--- a/src/demuxers/demux_asf.c
+++ b/src/demuxers/demux_asf.c
@@ -1540,6 +1540,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;
@@ -1562,9 +1563,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
diff --git a/src/demuxers/demux_flac.c b/src/demuxers/demux_flac.c
index 9a01c9adf..8acddb3c6 100644
--- a/src/demuxers/demux_flac.c
+++ b/src/demuxers/demux_flac.c
@@ -33,6 +33,9 @@
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
#define LOG_MODULE "demux_flac"
#define LOG_VERBOSE
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c
index d416ebeca..eecaef915 100644
--- a/src/demuxers/demux_real.c
+++ b/src/demuxers/demux_real.c
@@ -42,6 +42,9 @@
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
#define LOG_MODULE "demux_real"
#define LOG_VERBOSE