diff options
-rw-r--r-- | src/demuxers/demux_asf.c | 18 | ||||
-rw-r--r-- | src/demuxers/demux_avi.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_iff.c | 2 | ||||
-rw-r--r-- | src/demuxers/demux_matroska.c | 6 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg_block.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg_pes.c | 5 | ||||
-rw-r--r-- | src/demuxers/demux_ogg.c | 31 | ||||
-rw-r--r-- | src/demuxers/demux_wc3movie.c | 3 |
8 files changed, 46 insertions, 27 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 1250ba9a5..d2f0a89de 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.c @@ -513,13 +513,13 @@ static int asf_read_header (demux_asf_t *this) { * XX bytes : optional palette */ uint32_t width, height; - uint16_t bmiheader_size; + /*uint16_t bmiheader_size;*/ xine_bmiheader *bmiheader; width = _X_LE_32(asf_stream->private_data); height = _X_LE_32(asf_stream->private_data + 4); /* there is one unknown byte between height and the bmiheader size */ - bmiheader_size = _X_LE_16(asf_stream->private_data + 9); + /*bmiheader_size = _X_LE_16(asf_stream->private_data + 9);*/ /* FIXME: bmiheader_size must be >= sizeof(xine_bmiheader) */ @@ -998,8 +998,10 @@ static int asf_parse_packet_ecd(demux_asf_t *this, uint32_t *p_hdr_size) { /* return 0 if ok */ static int asf_parse_packet_payload_header(demux_asf_t *this, uint32_t p_hdr_size) { +#ifdef LOG int64_t timestamp; int64_t duration; +#endif this->packet_len_flags = get_byte(this); p_hdr_size += 1; this->packet_prop_flags = get_byte(this); p_hdr_size += 1; @@ -1038,8 +1040,10 @@ static int asf_parse_packet_payload_header(demux_asf_t *this, uint32_t p_hdr_siz this->packet_padsize = 0; } +#ifdef LOG timestamp = get_le32(this); p_hdr_size += 4; duration = get_le16(this); p_hdr_size += 2; +#endif lprintf ("timestamp=%"PRId64", duration=%"PRId64"\n", timestamp, duration); @@ -1581,11 +1585,11 @@ static int demux_asf_parse_asx_references( demux_asf_t *this) { ENTRYREF, MOREINFO, PARAM, REPEAT, TITLE */ - const char *base_href = NULL; + /*const char *base_href = NULL;*/ for (asx_entry = xml_tree->child; asx_entry; asx_entry = asx_entry->next) { - const char *ref_base_href = base_href; + /*const char *ref_base_href = base_href;*/ if (!strcasecmp (asx_entry->name, "ENTRY")) { @@ -1641,9 +1645,11 @@ static int demux_asf_parse_asx_references( demux_asf_t *this) { duration = asx_get_time_value (asx_ref); } +#if 0 else if (!strcasecmp (asx_ref->name, "BASE")) /* Attributes: HREF */ - ref_base_href = xml_parser_get_property (asx_entry, "HREF"); + ref_base_href = xml_parser_get_property (asx_entry, "HREF"); +#endif } /* FIXME: prepend ref_base_href to href */ @@ -1661,9 +1667,11 @@ static int demux_asf_parse_asx_references( demux_asf_t *this) { _x_demux_send_mrl_reference (this->stream, 0, href, NULL, 0, -1); } +#if 0 else if (!strcasecmp (asx_entry->name, "BASE")) /* Attributes: HREF */ base_href = xml_parser_get_property (asx_entry, "HREF"); +#endif } } else diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index 100828bd2..f4c9357fa 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.c @@ -732,8 +732,6 @@ static avi_t *XINE_MALLOC AVI_init(demux_avi_t *this) { int lasttag = 0; int vids_strh_seen = 0; int vids_strf_seen = 0; - int auds_strh_seen = 0; - int auds_strf_seen = 0; int num_stream = 0; uint8_t data[256]; int strf_size; @@ -898,7 +896,6 @@ static avi_t *XINE_MALLOC AVI_init(demux_avi_t *this) { a->dwSampleSize = _X_LE_32(hdrl_data + i + 44); a->audio_tot = 0; - auds_strh_seen = 1; lprintf("audio stream header, num_stream=%d\n", num_stream); lasttag = 2; /* auds */ @@ -985,7 +982,6 @@ static avi_t *XINE_MALLOC AVI_init(demux_avi_t *this) { AVI->audio[AVI->n_audio-1]->wavex = wavex; AVI->audio[AVI->n_audio-1]->wavex_len = n; lprintf("audio stream format\n"); - auds_strf_seen = 1; } } else if(strncasecmp(hdrl_data + i, "indx",4) == 0) { diff --git a/src/demuxers/demux_iff.c b/src/demuxers/demux_iff.c index 1785e86d7..fb7d1c748 100644 --- a/src/demuxers/demux_iff.c +++ b/src/demuxers/demux_iff.c @@ -689,7 +689,6 @@ static int demux_iff_send_chunk(demux_plugin_t *this_gen) { int64_t zw_pts; int64_t zw_rescale; int j, k; - int first_buf; int interleave_index; int size; @@ -791,7 +790,6 @@ static int demux_iff_send_chunk(demux_plugin_t *this_gen) { interleave_index = (current_file_pos * this->audio_compression_factor); } - first_buf = 1; zw_pts = current_file_pos; diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c index 3d1935587..deef0b3b6 100644 --- a/src/demuxers/demux_matroska.c +++ b/src/demuxers/demux_matroska.c @@ -1846,7 +1846,7 @@ static int parse_block (demux_matroska_t *this, size_t block_size, uint64_t track_num; uint8_t *data; uint8_t flags; - int gap, lacing, num_len; + int lacing, num_len; int16_t timecode_diff; int64_t pts, xduration; int decoder_flags = 0; @@ -1866,7 +1866,7 @@ static int parse_block (demux_matroska_t *this, size_t block_size, lprintf("track_num: %" PRIu64 ", timecode_diff: %d, flags: 0x%x\n", track_num, timecode_diff, flags); - gap = flags & 1; + /*gap = flags & 1;*/ lacing = (flags >> 1) & 0x3; /*fprintf(stderr, "lacing: %x\n", lacing);*/ @@ -2070,7 +2070,6 @@ static int parse_block (demux_matroska_t *this, size_t block_size, static int parse_simpleblock(demux_matroska_t *this, size_t block_len, uint64_t cluster_timecode, uint64_t block_duration) { - int has_block = 0; off_t block_pos = 0; off_t file_len = 0; int normpos = 0; @@ -2085,7 +2084,6 @@ static int parse_simpleblock(demux_matroska_t *this, size_t block_len, uint64_t if (!read_block_data(this, block_len, this->compress_maxlen)) return 0; - has_block = 1; /* we have the duration, we can parse the block now */ if (!parse_block(this, block_len, cluster_timecode, block_duration, normpos, is_key)) diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index aa5294e8b..08655ada9 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.c @@ -868,6 +868,7 @@ static int32_t parse_private_stream_1(demux_mpeg_block_t *this, uint8_t *p, buf_ } else if ((p[0]&0xf0) == 0xa0) { int pcm_offset; +#if 0 int number_of_frame_headers; int first_access_unit_pointer; int audio_frame_number; @@ -875,6 +876,7 @@ static int32_t parse_private_stream_1(demux_mpeg_block_t *this, uint8_t *p, buf_ int sample_rate; int num_channels; int dynamic_range; +#endif /* * found in http://members.freemail.absa.co.za/ginggs/dvd/mpeg2_lpcm.txt @@ -882,6 +884,7 @@ static int32_t parse_private_stream_1(demux_mpeg_block_t *this, uint8_t *p, buf_ */ track = p[0] & 0x0F; +#if 0 number_of_frame_headers = p[1]; /* unknown = p[2]; */ first_access_unit_pointer = p[3]; @@ -906,6 +909,7 @@ static int32_t parse_private_stream_1(demux_mpeg_block_t *this, uint8_t *p, buf_ case 2: bits_per_sample = 24; break; } dynamic_range = p[6]; +#endif /* send lpcm config byte */ buf->decoder_flags |= BUF_FLAG_SPECIAL; diff --git a/src/demuxers/demux_mpeg_pes.c b/src/demuxers/demux_mpeg_pes.c index 9ef7221f0..305069b3c 100644 --- a/src/demuxers/demux_mpeg_pes.c +++ b/src/demuxers/demux_mpeg_pes.c @@ -975,6 +975,7 @@ static int32_t parse_private_stream_1(demux_mpeg_pes_t *this, uint8_t *p, buf_el } else if ((p[0]&0xf0) == 0xa0) { int pcm_offset; +#if 0 int number_of_frame_headers; int first_access_unit_pointer; int audio_frame_number; @@ -982,13 +983,14 @@ static int32_t parse_private_stream_1(demux_mpeg_pes_t *this, uint8_t *p, buf_el int sample_rate; int num_channels; int dynamic_range; - +#endif /* * found in http://members.freemail.absa.co.za/ginggs/dvd/mpeg2_lpcm.txt * appears to be correct. */ track = p[0] & 0x0F; +#if 0 number_of_frame_headers = p[1]; /* unknown = p[2]; */ first_access_unit_pointer = p[3]; @@ -1019,6 +1021,7 @@ static int32_t parse_private_stream_1(demux_mpeg_pes_t *this, uint8_t *p, buf_el case 2: bits_per_sample = 24; break; } dynamic_range = p[6]; +#endif /* send lpcm config byte */ buf->decoder_flags |= BUF_FLAG_SPECIAL; diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index e0abd0cd6..8849e445e 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.c @@ -931,21 +931,27 @@ static void decode_video_header (demux_ogg_t *this, const int stream_num, ogg_pa xine_bmiheader bih; int channel; +#ifdef LOG int16_t locbits_per_sample; + int32_t locsize, locdefault_len, locbuffersize; + int64_t locsamples_per_unit; +#endif uint32_t locsubtype; - int32_t locsize, locdefault_len, locbuffersize, locwidth, locheight; - int64_t loctime_unit, locsamples_per_unit; + int32_t locwidth, locheight; + int64_t loctime_unit; /* read fourcc with machine endianness */ locsubtype = *((uint32_t *)&op->packet[9]); /* everything else little endian */ - locsize = _X_LE_32(&op->packet[13]); loctime_unit = _X_LE_64(&op->packet[17]); +#ifdef LOG + locsize = _X_LE_32(&op->packet[13]); locsamples_per_unit = _X_LE_64(&op->packet[25]); locdefault_len = _X_LE_32(&op->packet[33]); locbuffersize = _X_LE_32(&op->packet[37]); locbits_per_sample = _X_LE_16(&op->packet[41]); +#endif locwidth = _X_LE_32(&op->packet[45]); locheight = _X_LE_32(&op->packet[49]); @@ -1014,18 +1020,25 @@ static void decode_audio_header (demux_ogg_t *this, const int stream_num, ogg_pa char str[5]; int channel; - int16_t locbits_per_sample, locchannels, locblockalign; - int32_t locsize, locdefault_len, locbuffersize, locavgbytespersec; - int64_t loctime_unit, locsamples_per_unit; +#ifdef LOG + int16_t locblockalign; + int32_t locsize, locdefault_len, locbuffersize; + int64_t loctime_unit; +#endif + int16_t locbits_per_sample, locchannels; + int32_t locavgbytespersec; + int64_t locsamples_per_unit; +#ifdef LOG locsize = _X_LE_32(&op->packet[13]); loctime_unit = _X_LE_64(&op->packet[17]); - locsamples_per_unit = _X_LE_64(&op->packet[25]); - locdefault_len = _X_LE_32(&op->packet[33]); locbuffersize = _X_LE_32(&op->packet[37]); + locdefault_len = _X_LE_32(&op->packet[33]); + locblockalign = _X_LE_16(&op->packet[47]); +#endif + locsamples_per_unit = _X_LE_64(&op->packet[25]); locbits_per_sample = _X_LE_16(&op->packet[41]); locchannels = _X_LE_16(&op->packet[45]); - locblockalign = _X_LE_16(&op->packet[47]); locavgbytespersec= _X_LE_32(&op->packet[49]); lprintf ("direct show filter created audio stream detected, hexdump:\n"); diff --git a/src/demuxers/demux_wc3movie.c b/src/demuxers/demux_wc3movie.c index 36cc4eabb..3b310e90c 100644 --- a/src/demuxers/demux_wc3movie.c +++ b/src/demuxers/demux_wc3movie.c @@ -141,7 +141,6 @@ static int demux_mve_send_chunk(demux_plugin_t *this_gen) { demux_mve_t *this = (demux_mve_t *) this_gen; buf_element_t *buf = NULL; - int64_t text_pts = 0; int64_t audio_pts = 0; unsigned char preamble[PREAMBLE_SIZE]; unsigned int chunk_tag; @@ -264,7 +263,7 @@ static int demux_mve_send_chunk(demux_plugin_t *this_gen) { } this->video_pts += WC3_PTS_INC; } else if (chunk_tag == TEXT_TAG) { - text_pts = this->video_pts - WC3_PTS_INC; + /*text_pts = this->video_pts - WC3_PTS_INC;*/ /* unhandled thus far */ this->input->seek(this->input, chunk_size, SEEK_CUR); |