summaryrefslogtreecommitdiff
path: root/src/demuxers
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2008-05-29 16:03:35 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2008-05-29 16:03:35 +0100
commitf5345900a0e36a83841ad06b11aa4bdb22ebb883 (patch)
tree2217a11d2bf0d0bafcfbd1f9fc0f0fa1bfd91f29 /src/demuxers
parent2c946fa6a9b7b9b3edea5351c1f7021e51b7c177 (diff)
parenta5dfeeb30093308da4e614e4bc8fd642d01affcc (diff)
downloadxine-lib-f5345900a0e36a83841ad06b11aa4bdb22ebb883.tar.gz
xine-lib-f5345900a0e36a83841ad06b11aa4bdb22ebb883.tar.bz2
Merge from 1.1.
--HG-- rename : src/xine-utils/array.h => include/xine/array.h rename : src/xine-utils/attributes.h => include/xine/attributes.h rename : src/xine-engine/audio_out.h => include/xine/audio_out.h rename : src/xine-engine/broadcaster.h => include/xine/broadcaster.h rename : src/xine-engine/buffer.h => include/xine/buffer.h rename : src/xine-engine/configfile.h => include/xine/configfile.h rename : src/xine-utils/list.h => include/xine/list.h rename : src/xine-engine/metronom.h => include/xine/metronom.h rename : src/xine-engine/osd.h => include/xine/osd.h rename : src/xine-utils/pool.h => include/xine/pool.h rename : src/xine-engine/refcounter.h => include/xine/refcounter.h rename : src/xine-utils/ring_buffer.h => include/xine/ring_buffer.h rename : src/xine-engine/scratch.h => include/xine/scratch.h rename : src/xine-utils/sorted_array.h => include/xine/sorted_array.h rename : src/xine-engine/video_out.h => include/xine/video_out.h rename : src/xine-engine/video_overlay.h => include/xine/video_overlay.h rename : src/xine-engine/xine_internal.h => include/xine/xine_internal.h rename : src/xine-utils/xineutils.h => include/xine/xineutils.h rename : src/libspucc/cc_decoder.c => src/spu_dec/cc_decoder.c
Diffstat (limited to 'src/demuxers')
-rw-r--r--src/demuxers/asfheader.h2
-rw-r--r--src/demuxers/demux_avi.c2
-rw-r--r--src/demuxers/demux_matroska.c7
-rw-r--r--src/demuxers/demux_mpgaudio.c8
-rw-r--r--src/demuxers/demux_ts.c14
-rw-r--r--src/demuxers/ebml.h2
6 files changed, 14 insertions, 21 deletions
diff --git a/src/demuxers/asfheader.h b/src/demuxers/asfheader.h
index 4bd13ab3f..b895a1817 100644
--- a/src/demuxers/asfheader.h
+++ b/src/demuxers/asfheader.h
@@ -389,7 +389,7 @@ struct asf_stream_extension_s {
int asf_find_object_id (GUID *g);
void asf_get_guid (uint8_t *buffer, GUID *value);
-asf_header_t *asf_header_new (uint8_t *buffer, int buffer_len);
+asf_header_t *asf_header_new (uint8_t *buffer, int buffer_len) XINE_MALLOC;
void asf_header_choose_streams (asf_header_t *header, uint32_t bandwidth,
int *video_id, int *audio_id);
void asf_header_disable_streams (asf_header_t *header,
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index b6112ab12..0f1735f96 100644
--- a/src/demuxers/demux_avi.c
+++ b/src/demuxers/demux_avi.c
@@ -719,7 +719,7 @@ static void reset_idx(demux_avi_t *this, avi_t *AVI) {
}
}
-static avi_t *AVI_init(demux_avi_t *this) {
+static avi_t *XINE_MALLOC AVI_init(demux_avi_t *this) {
avi_t *AVI;
int i, j, idx_type;
diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c
index 976df13dc..b0919036f 100644
--- a/src/demuxers/demux_matroska.c
+++ b/src/demuxers/demux_matroska.c
@@ -58,13 +58,6 @@
#define WRAP_THRESHOLD 90000
-#if !defined(MIN)
-#define MIN(a, b) ((a)<(b)?(a):(b))
-#endif
-#if !defined(MAX)
-#define MAX(a, b) ((a)>(b)?(a):(b))
-#endif
-
typedef struct {
int track_num;
off_t *pos;
diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c
index 5304c9150..4171b1de8 100644
--- a/src/demuxers/demux_mpgaudio.c
+++ b/src/demuxers/demux_mpgaudio.c
@@ -316,8 +316,8 @@ static int parse_frame_header(mpg_audio_frame_t *const frame, const uint8_t *con
* Parse a Xing header
* return the Xing header or NULL on error
*/
-static xing_header_t* parse_xing_header(mpg_audio_frame_t *frame,
- uint8_t *buf, int bufsize) {
+static xing_header_t *XINE_MALLOC parse_xing_header(mpg_audio_frame_t *frame,
+ uint8_t *buf, int bufsize) {
uint8_t *ptr = buf;
xing_header_t *xing = NULL;
@@ -420,8 +420,8 @@ exit_error:
* Parse a Vbri header
* return the Vbri header or NULL on error
*/
-static vbri_header_t* parse_vbri_header(mpg_audio_frame_t *frame,
- uint8_t *buf, int bufsize) {
+static vbri_header_t *XINE_MALLOC parse_vbri_header(mpg_audio_frame_t *frame,
+ uint8_t *buf, int bufsize) {
int i;
uint8_t *ptr = buf;
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c
index ae8c6d1f7..a9224d4c4 100644
--- a/src/demuxers/demux_ts.c
+++ b/src/demuxers/demux_ts.c
@@ -185,9 +185,6 @@
#define INVALID_PROGRAM ((unsigned int)(-1))
#define INVALID_CC ((unsigned int)(-1))
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-
#define PROG_STREAM_MAP 0xBC
#define PRIVATE_STREAM1 0xBD
#define PADDING_STREAM 0xBE
@@ -220,7 +217,9 @@
ISO_13818_PART7_AUDIO = 0x0f, /* ISO/IEC 13818-7 Audio with ADTS transport sytax */
ISO_14496_PART2_VIDEO = 0x10, /* ISO/IEC 14496-2 Visual (MPEG-4) */
ISO_14496_PART3_AUDIO = 0x11, /* ISO/IEC 14496-3 Audio with LATM transport syntax */
- ISO_14496_PART10_VIDEO = 0x1b /* ISO/IEC 14496-10 Video (MPEG-4 part 10/AVC, aka H.264) */
+ ISO_14496_PART10_VIDEO = 0x1b, /* ISO/IEC 14496-10 Video (MPEG-4 part 10/AVC, aka H.264) */
+ STREAM_VIDEO_MPEG = 0x80,
+ STREAM_AUDIO_AC3 = 0x81,
} streamType;
#define WRAP_THRESHOLD 270000
@@ -729,14 +728,14 @@ static int demux_ts_parse_pes_header (xine_t *xine, demux_ts_media *m,
* do not include any of the ac3 header info in their audio tracks
* these "raw" streams may begin with a byte that looks like a stream type.
*/
- if((m->descriptor_tag == 0x81) || /* ac3 - raw */
+ if((m->descriptor_tag == STREAM_AUDIO_AC3) || /* ac3 - raw */
(p[0] == 0x0B && p[1] == 0x77)) { /* ac3 - syncword */
m->content = p;
m->size = packet_len;
m->type |= BUF_AUDIO_A52;
return 1;
- } else if (m->descriptor_tag == 0x06
+ } else if (m->descriptor_tag == ISO_13818_PES_PRIVATE
&& p[0] == 0x20 && p[1] == 0x00) {
/* DVBSUB */
long payload_len = ((buf[4] << 8) | buf[5]) - header_len - 3;
@@ -784,6 +783,7 @@ static int demux_ts_parse_pes_header (xine_t *xine, demux_ts_media *m,
switch (m->descriptor_tag) {
case ISO_11172_VIDEO:
case ISO_13818_VIDEO:
+ case STREAM_VIDEO_MPEG:
lprintf ("demux_ts: found MPEG video type.\n");
m->type = BUF_VIDEO_MPEG;
break;
@@ -1327,7 +1327,7 @@ printf("Program Number is %i, looking for %i\n",program_number,this->program_num
printf ("demux_ts: PMT AC3 audio pid 0x%.4x type %2.2x\n", pid, stream[0]);
#endif
demux_ts_pes_new(this, this->media_num, pid,
- this->audio_fifo, 0x81);
+ this->audio_fifo, STREAM_AUDIO_AC3);
this->audio_tracks[this->audio_tracks_count].pid = pid;
this->audio_tracks[this->audio_tracks_count].media_index = this->media_num;
diff --git a/src/demuxers/ebml.h b/src/demuxers/ebml.h
index a090bb130..764f416ff 100644
--- a/src/demuxers/ebml.h
+++ b/src/demuxers/ebml.h
@@ -65,7 +65,7 @@ typedef struct ebml_parser_s {
} ebml_parser_t;
-ebml_parser_t *new_ebml_parser (xine_t *xine, input_plugin_t *input);
+ebml_parser_t *new_ebml_parser (xine_t *xine, input_plugin_t *input) XINE_MALLOC;
void dispose_ebml_parser (ebml_parser_t *ebml);