From 78ae9df0951481d83e7a32d05d0677145034382a Mon Sep 17 00:00:00 2001 From: Ewald Snel Date: Tue, 6 May 2003 20:19:56 +0000 Subject: Fix decoding of some Real 28.8 files (such as 'KAZ1.ra' from MPlayer ftp) CVS patchset: 4784 CVS date: 2003/05/06 20:19:56 --- src/demuxers/demux_realaudio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/demuxers/demux_realaudio.c b/src/demuxers/demux_realaudio.c index 6d0115b97..a184e6f69 100644 --- a/src/demuxers/demux_realaudio.c +++ b/src/demuxers/demux_realaudio.c @@ -19,7 +19,7 @@ * * RealAudio File Demuxer by Mike Melanson (melanson@pcisys.net) * - * $Id: demux_realaudio.c,v 1.19 2003/04/17 19:01:27 miguelfreitas Exp $ + * $Id: demux_realaudio.c,v 1.20 2003/05/06 20:19:56 esnel Exp $ * */ @@ -104,7 +104,7 @@ static int open_ra_file(demux_ra_t *this) { return 0; /* find the important information */ - this->data_start = RA_FILE_HEADER_SIZE + RA_AUDIO_HEADER_SIZE; + this->data_start = RA_FILE_HEADER_SIZE + BE_32(&audio_header[0x02]); this->data_size = BE_32(&audio_header[0x0C]); this->wave.nChannels = audio_header[0x27]; this->wave.nSamplesPerSec = BE_16(&audio_header[0x20]); @@ -113,6 +113,11 @@ static int open_ra_file(demux_ra_t *this) { this->audio_fourcc = *(unsigned int *)&audio_header[0x2E]; this->audio_type = formattag_to_buf_audio(this->audio_fourcc); + /* skip extra header data (such as song title etc.) */ + if (this->input->seek(this->input, this->data_start, SEEK_SET) != + this->data_start) + return 0; + if( !this->audio_type ) this->audio_type = BUF_AUDIO_UNKNOWN; -- cgit v1.2.3