alac : fix case where bits_per_sample is not set.

Patch by Baptiste

Originally committed as revision 15275 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2008-09-08 19:05:46 +00:00 committed by Jai Menon
parent c7e34ddc42
commit 9345ae6f78

View File

@ -597,7 +597,7 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
alac->context_initialized = 0;
alac->numchannels = alac->avctx->channels;
alac->bytespersample = (avctx->bits_per_coded_sample / 8) * alac->numchannels;
alac->bytespersample = 2 * alac->numchannels;
avctx->sample_fmt = SAMPLE_FMT_S16;
return 0;