summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-08 13:30:17 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-08 13:31:09 +0200
commit5fa56e6e623948e7316c2d3d1a221e4ab48f6cc4 (patch)
treec8e6ebaa65b3a08b420ede9bfae3d9b568320b29
parentcf7f798984a9d93a2297ecbf203b85a660317e31 (diff)
parent744e7eea5d815efea777b6179d96e8d94b63ccfa (diff)
downloadffmpeg-5fa56e6e623948e7316c2d3d1a221e4ab48f6cc4.tar.gz
Merge commit '744e7eea5d815efea777b6179d96e8d94b63ccfa' into release/1.1
* commit '744e7eea5d815efea777b6179d96e8d94b63ccfa': adpcm: Avoid reading out of bounds in the IMA QT trellis encoder Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/adpcmenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 217d165f30..3bde2adb19 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -558,7 +558,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
put_bits(&pb, 7, status->step_index);
if (avctx->trellis > 0) {
uint8_t buf[64];
- adpcm_compress_trellis(avctx, &samples_p[ch][1], buf, status,
+ adpcm_compress_trellis(avctx, &samples_p[ch][0], buf, status,
64, 1);
for (i = 0; i < 64; i++)
put_bits(&pb, 4, buf[i ^ 1]);