aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wmadec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-01-21 17:34:12 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-01-21 17:34:12 +0000
commit68f593b48433842f3407586679fe07f3e5199ab9 (patch)
treed4630fb579685c92841ecf5b78d3cc47456d07d1 /libavcodec/wmadec.c
parentfe50f38577887ea8e1a66a95503a97438e2d768f (diff)
downloadffmpeg-68f593b48433842f3407586679fe07f3e5199ab9.tar.gz
GetBitContext.size is allways multiplied by 8 -> use size_in_bits to avoid useless *8 in a few inner loops
Originally committed as revision 1486 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wmadec.c')
-rw-r--r--libavcodec/wmadec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index a6fa2f8b2a..a80e030aa5 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -1226,7 +1226,7 @@ static int wma_decode_superframe(AVCodecContext *avctx,
samples = data;
- init_get_bits(&s->gb, buf, buf_size);
+ init_get_bits(&s->gb, buf, buf_size*8);
if (s->use_bit_reservoir) {
/* read super frame header */
@@ -1252,7 +1252,7 @@ static int wma_decode_superframe(AVCodecContext *avctx,
}
/* XXX: bit_offset bits into last frame */
- init_get_bits(&s->gb, s->last_superframe, MAX_CODED_SUPERFRAME_SIZE);
+ init_get_bits(&s->gb, s->last_superframe, MAX_CODED_SUPERFRAME_SIZE*8);
/* skip unused bits */
if (s->last_bitoffset > 0)
skip_bits(&s->gb, s->last_bitoffset);
@@ -1265,7 +1265,7 @@ static int wma_decode_superframe(AVCodecContext *avctx,
/* read each frame starting from bit_offset */
pos = bit_offset + 4 + 4 + s->byte_offset_bits + 3;
- init_get_bits(&s->gb, buf + (pos >> 3), MAX_CODED_SUPERFRAME_SIZE - (pos >> 3));
+ init_get_bits(&s->gb, buf + (pos >> 3), (MAX_CODED_SUPERFRAME_SIZE - (pos >> 3))*8);
len = pos & 7;
if (len > 0)
skip_bits(&s->gb, len);