diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-07-09 04:20:23 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-08-24 11:32:26 +0200 |
commit | 67a8a1c20242de9481ca491aa0bbbfad9c8b6565 (patch) | |
tree | df14e467487fb16e8f8e551f2d98f9f7add78c58 | |
parent | 8f3fe7c696866c965ebc4444aaa5487bb1cd53f1 (diff) | |
download | ffmpeg-67a8a1c20242de9481ca491aa0bbbfad9c8b6565.tar.gz |
atrac3: set the getbits context the right buffer_end
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 22e76ec635bafdd1d1ec35581a7ac09e69e3c43e)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r-- | libavcodec/atrac3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index 632cc37a0b..b2052f7aa9 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], |