From 736cc44919cb9b010e4784821afb060b1352945a Mon Sep 17 00:00:00 2001 From: Carlo Bramini Date: Tue, 13 Oct 2009 22:06:09 +0100 Subject: #include guards and __attribute__ fixups --- src/demuxers/demux_flac.c | 3 +++ src/demuxers/demux_real.c | 3 +++ src/demuxers/demux_tta.c | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/demuxers') diff --git a/src/demuxers/demux_flac.c b/src/demuxers/demux_flac.c index c14536040..c4132b767 100644 --- a/src/demuxers/demux_flac.c +++ b/src/demuxers/demux_flac.c @@ -33,6 +33,9 @@ #include #include #include +#ifdef HAVE_MALLOC_H +#include +#endif #define LOG_MODULE "demux_flac" #define LOG_VERBOSE diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 8f1e4f539..774c74e2c 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -42,6 +42,9 @@ #include #include #include +#ifdef HAVE_MALLOC_H +#include +#endif #define LOG_MODULE "demux_real" #define LOG_VERBOSE diff --git a/src/demuxers/demux_tta.c b/src/demuxers/demux_tta.c index 24a983157..7853c8182 100644 --- a/src/demuxers/demux_tta.c +++ b/src/demuxers/demux_tta.c @@ -58,7 +58,7 @@ typedef struct { uint32_t samplerate; uint32_t data_length; uint32_t crc32; - } __attribute__((__packed__)) tta; + } XINE_PACKED tta; uint8_t buffer[22]; /* This is the size of the header */ } header; } demux_tta_t; -- cgit v1.2.3 From 6efc8270ef8f75a842930a0f703cb3539f106d4b Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Thu, 15 Oct 2009 22:01:24 +0100 Subject: Make the XML lexer and parser re-entrant --- src/demuxers/demux_asf.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/demuxers') 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 -- cgit v1.2.3