diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-06-25 14:23:07 +0100 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-06-25 14:23:07 +0100 |
commit | 12d448abc1b017b5443d94ab5bfc8166e64cd431 (patch) | |
tree | 411117a7136334ec628bf7290a4c3ce443b88f47 /src | |
parent | 02b32af1b770a930b8b97d5aa45aa5b4b693352b (diff) | |
parent | bd4907c53142950edcb09c3a7c9f693e890deb8c (diff) | |
download | xine-lib-12d448abc1b017b5443d94ab5bfc8166e64cd431.tar.gz xine-lib-12d448abc1b017b5443d94ab5bfc8166e64cd431.tar.bz2 |
Merge from 1.1.
--HG--
rename : po/libxine1.pot => po/libxine2.pot
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_ts.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index 5bc5a4d9e..4c2c11cae 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -736,12 +736,13 @@ static int demux_ts_parse_pes_header (xine_t *xine, demux_ts_media *m, * we check the descriptor tag first because some stations * 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. + * For audio streams, m->type already contains the stream no. */ 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; + m->type |= BUF_AUDIO_A52; return 1; } else if (m->descriptor_tag == ISO_13818_PES_PRIVATE @@ -751,7 +752,7 @@ static int demux_ts_parse_pes_header (xine_t *xine, demux_ts_media *m, m->content = p; m->size = packet_len; - m->type = BUF_SPU_DVB; + m->type |= BUF_SPU_DVB; m->buf->decoder_info[2] = payload_len; return 1; } else if ((p[0] & 0xE0) == 0x20) { @@ -765,7 +766,7 @@ static int demux_ts_parse_pes_header (xine_t *xine, demux_ts_media *m, m->content = p+4; m->size = packet_len - 4; - m->type = BUF_AUDIO_A52; + m->type |= BUF_AUDIO_A52; return 1; } else if ((p[0]&0xf0) == 0xa0) { @@ -781,7 +782,7 @@ static int demux_ts_parse_pes_header (xine_t *xine, demux_ts_media *m, m->content = p+pcm_offset; m->size = packet_len-pcm_offset; - m->type = BUF_AUDIO_LPCM_BE; + m->type |= BUF_AUDIO_LPCM_BE; return 1; } @@ -819,16 +820,16 @@ static int demux_ts_parse_pes_header (xine_t *xine, demux_ts_media *m, case ISO_11172_AUDIO: case ISO_13818_AUDIO: lprintf ("demux_ts: found MPEG audio track.\n"); - m->type = BUF_AUDIO_MPEG; + m->type |= BUF_AUDIO_MPEG; break; case ISO_13818_PART7_AUDIO: case ISO_14496_PART3_AUDIO: lprintf ("demux_ts: found AAC audio track.\n"); - m->type = BUF_AUDIO_AAC; + m->type |= BUF_AUDIO_AAC; break; default: lprintf ("demux_ts: unknown audio type: %d, defaulting to MPEG.\n", m->descriptor_tag); - m->type = BUF_AUDIO_MPEG; + m->type |= BUF_AUDIO_MPEG; break; } return 1; @@ -1861,6 +1862,7 @@ static void demux_ts_parse_packet (demux_ts_t*this) { xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_ts: auto-detected audio pid 0x%.4x\n", pid); #endif + /* store PID, index and stream no. */ this->audio_tracks[this->audio_tracks_count].pid = pid; this->audio_tracks[this->audio_tracks_count].media_index = this->media_num; this->media[this->media_num].type = this->audio_tracks_count; |