diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-12-30 18:37:29 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-12-30 18:37:29 +0000 |
commit | cb2f69533fd5771c386d1b994b2179e76c4ded54 (patch) | |
tree | 98f4f9bff7afd6e9f0ce2c50b01d1e5ad55ec539 /src/demuxers | |
parent | 6dbb05a4cba3cdc811308762058d722f11464683 (diff) | |
parent | aa3d3aacdb991ad989933d71734e300535c7d350 (diff) | |
download | xine-lib-cb2f69533fd5771c386d1b994b2179e76c4ded54.tar.gz xine-lib-cb2f69533fd5771c386d1b994b2179e76c4ded54.tar.bz2 |
Merge from 1.1 (except po/*; translators needed for this).
--HG--
rename : src/video_out/vidix/drivers/mga_vid.c => contrib/vidix/drivers/mga_vid.c
rename : src/video_out/vidix/drivers/nvidia_vid.c => contrib/vidix/drivers/nvidia_vid.c
rename : src/video_out/vidix/drivers/savage_vid.c => contrib/vidix/drivers/savage_vid.c
rename : src/xine-engine/video_out.h => include/xine/video_out.h
rename : src/xine-utils/xmllexer.h => include/xine/xmllexer.h
rename : po/libxine1.pot => po/libxine2.pot
rename : src/libsputext/xine_sputext_decoder.c => src/spu_dec/sputext_decoder.c
rename : src/libsputext/demux_sputext.c => src/spu_dec/sputext_demuxer.c
Diffstat (limited to 'src/demuxers')
-rw-r--r-- | src/demuxers/demux_aiff.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/demuxers/demux_aiff.c b/src/demuxers/demux_aiff.c index d3b19701a..51bc624e3 100644 --- a/src/demuxers/demux_aiff.c +++ b/src/demuxers/demux_aiff.c @@ -87,7 +87,6 @@ static int open_aiff_file(demux_aiff_t *this) { unsigned char preamble[PREAMBLE_SIZE]; unsigned int chunk_type; unsigned int chunk_size; - unsigned char buffer[100]; if (_x_demux_read_header(this->input, signature, AIFF_SIGNATURE_SIZE) != AIFF_SIGNATURE_SIZE) return 0; @@ -118,13 +117,15 @@ static int open_aiff_file(demux_aiff_t *this) { chunk_type = _X_BE_32(&preamble[0]); chunk_size = _X_BE_32(&preamble[4]); - if (chunk_size > sizeof(buffer) / sizeof(buffer[0])) { - /* the chunk is too large to fit in the buffer -> this cannot be an aiff chunk */ - this->status = DEMUX_FINISHED; - return 0; - } - if (chunk_type == COMM_TAG) { + unsigned char buffer[100]; + + if (chunk_size > sizeof(buffer) / sizeof(buffer[0])) { + /* the chunk is too large to fit in the buffer -> this cannot be an aiff chunk */ + this->status = DEMUX_FINISHED; + return 0; + } + if (this->input->read(this->input, buffer, chunk_size) != chunk_size) { this->status = DEMUX_FINISHED; |