From b6204677f65189bf1fa201051e660ba74f1246f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Tue, 27 Dec 2005 19:58:04 +0000 Subject: [PATCH] Fix wma2 audio decoder Patch by Reimar Doeffinger Originally committed as revision 4779 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/wmadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index 147bb5abbb..c6aeab59d3 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -284,7 +284,7 @@ static int wma_decode_init(AVCodecContext * avctx) } bps = (float)s->bit_rate / (float)(s->nb_channels * s->sample_rate); - s->byte_offset_bits = av_log2((int)(bps * s->frame_len / 8.0)) + 2; + s->byte_offset_bits = av_log2((int)(bps * s->frame_len / 8.0 + 0.5)) + 2; /* compute high frequency value and choose if noise coding should be activated */