diff options
author | James Stembridge <jstembridge@users.sourceforge.net> | 2004-02-03 21:20:04 +0000 |
---|---|---|
committer | James Stembridge <jstembridge@users.sourceforge.net> | 2004-02-03 21:20:04 +0000 |
commit | d5e1429776b6364288c809bb9bb825c36c3c1013 (patch) | |
tree | 5423cbd2d3d723afa2df540b8c4b827e5f44509c | |
parent | ed3e1bd8cad1ceab0d020881abddcd99b3bcf733 (diff) | |
download | xine-lib-d5e1429776b6364288c809bb9bb825c36c3c1013.tar.gz xine-lib-d5e1429776b6364288c809bb9bb825c36c3c1013.tar.bz2 |
Send all of audio type specific data to decoder instead of skipping first 4 bytes
CVS patchset: 6113
CVS date: 2004/02/03 21:20:04
-rw-r--r-- | src/demuxers/demux_real.c | 8 | ||||
-rw-r--r-- | src/libreal/audio_decoder.c | 32 |
2 files changed, 20 insertions, 20 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 834428a77..abc44365c 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -31,7 +31,7 @@ * * Based on FFmpeg's libav/rm.c. * - * $Id: demux_real.c,v 1.90 2004/01/30 17:17:03 jstembridge Exp $ + * $Id: demux_real.c,v 1.91 2004/02/03 21:20:04 jstembridge Exp $ */ #ifdef HAVE_CONFIG_H @@ -737,11 +737,11 @@ unknown: buf->decoder_info[2]); } else { - memcpy(buf->content, mdpr->type_specific_data + 4, - mdpr->type_specific_len - 4); + memcpy(buf->content, mdpr->type_specific_data, + mdpr->type_specific_len); buf->decoder_flags |= BUF_FLAG_HEADER; - buf->size = mdpr->type_specific_len - 4; + buf->size = mdpr->type_specific_len; } this->audio_fifo->put (this->audio_fifo, buf); diff --git a/src/libreal/audio_decoder.c b/src/libreal/audio_decoder.c index a32b169af..f9e4227a5 100644 --- a/src/libreal/audio_decoder.c +++ b/src/libreal/audio_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_decoder.c,v 1.35 2004/01/12 17:35:17 miguelfreitas Exp $ + * $Id: audio_decoder.c,v 1.36 2004/02/03 21:20:04 jstembridge Exp $ * * thin layer to use real binary-only codecs in xine * @@ -188,27 +188,27 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) { * extract header data */ - version = BE_16 (buf->content); + version = BE_16 (buf->content+4); lprintf ("header buffer detected, header version %d\n", version); #ifdef LOG xine_hexdump (buf->content, buf->size); #endif - flavor = BE_16 (buf->content+18); - coded_frame_size = BE_32 (buf->content+20); - codec_data_length= BE_16 (buf->content+36); - coded_frame_size2= BE_16 (buf->content+38); - subpacket_size = BE_16 (buf->content+40); + flavor = BE_16 (buf->content+22); + coded_frame_size = BE_32 (buf->content+24); + codec_data_length= BE_16 (buf->content+40); + coded_frame_size2= BE_16 (buf->content+42); + subpacket_size = BE_16 (buf->content+44); this->sps = subpacket_size; this->w = coded_frame_size2; this->h = codec_data_length; if (version == 4) { - samples_per_sec = BE_16 (buf->content+44); - bits_per_sample = BE_16 (buf->content+48); - num_channels = BE_16 (buf->content+50); + samples_per_sec = BE_16 (buf->content+48); + bits_per_sample = BE_16 (buf->content+52); + num_channels = BE_16 (buf->content+54); /* FIXME: */ if (buf->type==BUF_AUDIO_COOK) { @@ -218,14 +218,14 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) { abort(); } data_len = 0; /* FIXME: COOK audio needs this */ - extras = buf->content+0x43; + extras = buf->content+71; } else { - samples_per_sec = BE_16 (buf->content+50); - bits_per_sample = BE_16 (buf->content+54); - num_channels = BE_16 (buf->content+56); - data_len = BE_32 (buf->content+0x46); - extras = buf->content+0x4a; + samples_per_sec = BE_16 (buf->content+54); + bits_per_sample = BE_16 (buf->content+58); + num_channels = BE_16 (buf->content+60); + data_len = BE_32 (buf->content+74); + extras = buf->content+78; } this->block_align= coded_frame_size2; |