diff options
author | James Stembridge <jstembridge@users.sourceforge.net> | 2004-03-13 19:42:22 +0000 |
---|---|---|
committer | James Stembridge <jstembridge@users.sourceforge.net> | 2004-03-13 19:42:22 +0000 |
commit | 29e74808ea03ac697f2e4753a17a04c3270a015b (patch) | |
tree | 595c1ece80f5765f3f7e575938a91f8f29a3136d /src | |
parent | 1d8ef7b21a40d606ff1059afb79b5b63890f6b9b (diff) | |
download | xine-lib-29e74808ea03ac697f2e4753a17a04c3270a015b.tar.gz xine-lib-29e74808ea03ac697f2e4753a17a04c3270a015b.tar.bz2 |
Fix MS ADPCM decoding
CVS patchset: 6247
CVS date: 2004/03/13 19:42:22
Diffstat (limited to 'src')
-rw-r--r-- | src/libffmpeg/audio_decoder.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libffmpeg/audio_decoder.c b/src/libffmpeg/audio_decoder.c index eddacdd46..26a04ff9c 100644 --- a/src/libffmpeg/audio_decoder.c +++ b/src/libffmpeg/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.4 2004/02/07 18:38:21 jstembridge Exp $ + * $Id: audio_decoder.c,v 1.5 2004/03/13 19:42:22 jstembridge Exp $ * * xine audio decoder plugin using ffmpeg * @@ -139,7 +139,10 @@ static void ff_audio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) this->context = avcodec_alloc_context(); this->context->sample_rate = this->audio_sample_rate = buf->decoder_info[1]; - this->audio_bits = buf->decoder_info[2]; + /* Current ffmpeg audio decoders always use 16 bits/sample + * buf->decoder_info[2] can't be used as it doesn't refer to the output + * bits/sample for some codecs (e.g. MS ADPCM) */ + this->audio_bits = 16; this->context->channels = this->audio_channels = buf->decoder_info[3]; this->context->block_align = audio_header->nBlockAlign; this->context->bit_rate = audio_header->nAvgBytesPerSec * 8; |