[FFmpeg-cvslog] atrac3: set the getbits context the right buffer_end

Luca Barbato git at videolan.org
Wed Jul 10 12:24:38 CEST 2013


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Tue Jul  9 04:20:23 2013 +0200| [22e76ec635bafdd1d1ec35581a7ac09e69e3c43e] | committer: Luca Barbato

atrac3: set the getbits context the right buffer_end

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=22e76ec635bafdd1d1ec35581a7ac09e69e3c43e
---

 libavcodec/atrac3.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index dbdf77c..cd120e9 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -742,7 +742,7 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *databuf,
 
 
         /* set the bitstream reader at the start of the second Sound Unit*/
-        init_get_bits(&q->gb, ptr1, avctx->block_align * 8);
+        init_get_bits(&q->gb, ptr1, (avctx->block_align - i) * 8);
 
         /* Fill the Weighting coeffs delay buffer */
         memmove(q->weighting_delay, &q->weighting_delay[2],



More information about the ffmpeg-cvslog mailing list