From 68f593b48433842f3407586679fe07f3e5199ab9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 21 Jan 2003 17:34:12 +0000 Subject: 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 --- libavcodec/mpegaudiodec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/mpegaudiodec.c') diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 6b2f004a3b..9a066c905b 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1460,7 +1460,7 @@ static void seek_to_maindata(MPADecodeContext *s, long backstep) memcpy(ptr, s->inbuf1[s->inbuf_index ^ 1] + BACKSTEP_SIZE + s->old_frame_size - backstep, backstep); /* init get bits again */ - init_get_bits(&s->gb, ptr, s->frame_size + backstep); + init_get_bits(&s->gb, ptr, (s->frame_size + backstep)*8); /* prepare next buffer */ s->inbuf_index ^= 1; @@ -2280,7 +2280,7 @@ static int mp_decode_frame(MPADecodeContext *s, short *samples_ptr; init_get_bits(&s->gb, s->inbuf + HEADER_SIZE, - s->inbuf_ptr - s->inbuf - HEADER_SIZE); + (s->inbuf_ptr - s->inbuf - HEADER_SIZE)*8); /* skip error protection field */ if (s->error_protection) -- cgit v1.2.3