From: Baptiste Coudurier Date: Mon, 8 Sep 2008 19:05:46 +0000 (+0000) Subject: alac : fix case where bits_per_sample is not set. X-Git-Tag: v0.5~2603 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9345ae6f782719156acb5e0474226eb15d9f7ce2;p=platform%2Fupstream%2Flibav.git 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 --- diff --git a/libavcodec/alac.c b/libavcodec/alac.c index 9c5f621..8cf1ccc 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -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;