Mercurial > libavcodec.hg
diff mpegaudiodec.c @ 1025:1f9afd8b9131 libavcodec
GetBitContext.size is allways multiplied by 8 -> use size_in_bits to avoid useless *8 in a few inner loops
author | michaelni |
---|---|
date | Tue, 21 Jan 2003 17:34:12 +0000 |
parents | 48349e11c9b2 |
children | bb5de8a59da8 |
line wrap: on
line diff
--- a/mpegaudiodec.c Mon Jan 20 22:50:14 2003 +0000 +++ b/mpegaudiodec.c Tue Jan 21 17:34:12 2003 +0000 @@ -1460,7 +1460,7 @@ 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 @@ 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)