diff options
Diffstat (limited to 'src/demuxers')
-rw-r--r-- | src/demuxers/demux_real.c | 2 | ||||
-rw-r--r-- | src/demuxers/demux_realaudio.c | 2 | ||||
-rw-r--r-- | src/demuxers/demux_wav.c | 3 | ||||
-rw-r--r-- | src/demuxers/id3.c | 20 | ||||
-rw-r--r-- | src/demuxers/id3.h | 23 |
5 files changed, 21 insertions, 29 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 45e8a2e38..cc86e94b2 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -240,7 +240,7 @@ static void real_parse_index(demux_real_t *this) { if(index && entries) /* Allocate memory for index */ - *index = xine_xcalloc(entries, sizeof(real_index_entry_t)); + *index = calloc(entries, sizeof(real_index_entry_t)); if(index && entries && *index) { /* Read index */ diff --git a/src/demuxers/demux_realaudio.c b/src/demuxers/demux_realaudio.c index 2873a522e..6a88a8065 100644 --- a/src/demuxers/demux_realaudio.c +++ b/src/demuxers/demux_realaudio.c @@ -243,12 +243,10 @@ static int demux_ra_send_chunk(demux_plugin_t *this_gen) { } if (this->audio_type == BUF_AUDIO_28_8 || this->audio_type == BUF_AUDIO_SIPRO) { - int x; uint8_t * buffer; buffer = this->frame_buffer; if (this->audio_type == BUF_AUDIO_SIPRO) { - int n; int len = this->h * this->w; if(this->input->read(this->input, this->frame_buffer, len) < len) { xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c index 2beb43291..e2cb95035 100644 --- a/src/demuxers/demux_wav.c +++ b/src/demuxers/demux_wav.c @@ -111,9 +111,6 @@ static int find_chunk_by_tag(demux_wav_t *this, const uint32_t given_chunk_tag, /* returns 1 if the WAV file was opened successfully, 0 otherwise */ static int open_wav_file(demux_wav_t *this) { uint8_t signature[WAV_SIGNATURE_SIZE]; - uint32_t chunk_tag; - uint32_t chunk_size; - uint8_t chunk_preamble[8]; off_t wave_pos; /* check the signature */ diff --git a/src/demuxers/id3.c b/src/demuxers/id3.c index 71cb5e743..b57d1bd82 100644 --- a/src/demuxers/id3.c +++ b/src/demuxers/id3.c @@ -329,9 +329,9 @@ static int id3v22_interp_frame(input_plugin_t *input, } -int id3v22_parse_tag(input_plugin_t *input, - xine_stream_t *stream, - uint32_t id3_signature) { +static int id3v22_parse_tag(input_plugin_t *input, + xine_stream_t *stream, + uint32_t id3_signature) { id3v2_header_t tag_header; id3v22_frame_header_t tag_frame_header; int pos = 0; @@ -514,9 +514,9 @@ static int id3v23_interp_frame(input_plugin_t *input, } } -int id3v23_parse_tag(input_plugin_t *input, - xine_stream_t *stream, - uint32_t id3_signature) { +static int id3v23_parse_tag(input_plugin_t *input, + xine_stream_t *stream, + uint32_t id3_signature) { id3v2_header_t tag_header; id3v23_frame_header_t tag_frame_header; id3v23_frame_ext_header_t tag_frame_ext_header; @@ -759,9 +759,9 @@ static int id3v24_interp_frame(input_plugin_t *input, } } -int id3v24_parse_tag(input_plugin_t *input, - xine_stream_t *stream, - uint32_t id3_signature) { +static int id3v24_parse_tag(input_plugin_t *input, + xine_stream_t *stream, + uint32_t id3_signature) { id3v2_header_t tag_header; id3v24_frame_header_t tag_frame_header; id3v24_frame_ext_header_t tag_frame_ext_header; @@ -849,6 +849,6 @@ int id3v2_parse_tag(input_plugin_t *input, default: xprintf(stream->xine, XINE_VERBOSITY_LOG, LOG_MODULE ": Unknown ID3v2 signature: 0x%08x.\n", be2me_32(id3_signature)); } - + return 0; } diff --git a/src/demuxers/id3.h b/src/demuxers/id3.h index 542a17bc4..837d8243f 100644 --- a/src/demuxers/id3.h +++ b/src/demuxers/id3.h @@ -152,19 +152,16 @@ typedef struct { int id3v1_parse_tag (input_plugin_t *input, xine_stream_t *stream); -int id3v22_parse_tag(input_plugin_t *input, - xine_stream_t *stream, - uint32_t id3_signature); - -int id3v23_parse_tag(input_plugin_t *input, - xine_stream_t *stream, - uint32_t id3_signature); - -int id3v24_parse_tag(input_plugin_t *input, - xine_stream_t *stream, - uint32_t id3_signature); - -/* Generic function that switch between the three above */ +/** + * @brief Generic function for ID3v2 tags parsing. + * @param input Pointer to the input plugin used by the demuxer, used + * to access the tag's data. + * @param stream Pointer to the xine stream currently being read. + * @param mp3_frame_header Header of the MP3 frame carrying the tag. + * + * @note This function will take care of calling the proper function for + * parsing ID3v2.2, ID3v2.3 or ID3v2.4 tags. + */ int id3v2_parse_tag(input_plugin_t *input, xine_stream_t *stream, uint32_t id3_signature); |