summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/wmadec.c2
1 files changed, 1 insertions, 1 deletions
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 */