[FFmpeg-devel] [PATCH] g729dec: initialize bit reader with the correct buffer size

Vitor Sessak vitor1001 at gmail.com
Sat Oct 1 10:47:11 CEST 2011


---
 libavcodec/g729dec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c
index e818b46..d765679 100644
--- a/libavcodec/g729dec.c
+++ b/libavcodec/g729dec.c
@@ -436,7 +436,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         frame_erasure |= buf[i];
     frame_erasure = !frame_erasure;
 
-    init_get_bits(&gb, buf, buf_size);
+    init_get_bits(&gb, buf, 8*buf_size);
 
     ma_predictor     = get_bits(&gb, 1);
     quantizer_1st    = get_bits(&gb, VQ_1ST_BITS);
-- 
1.7.0.4



More information about the ffmpeg-devel mailing list