adpcmdec: fix "warning: array subscript is above array bounds"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-02-25 02:50:58 +01:00
parent 3d3b603f7f
commit 7b9d8703f3

View File

@ -1190,7 +1190,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
/* Initialize the previous sample. */
for (i = 0; i < 4; i++)
prev[0][i] = (int16_t)bytestream_get_be16(&src);
prev[i>>1][i&1] = (int16_t)bytestream_get_be16(&src);
for (ch = 0; ch <= st; ch++) {
samples = (short *)c->frame.data[0] + ch;