From ef475620b55a166b2131fd478391d4054f19ecd5 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Sat, 21 Sep 2013 15:33:11 +0200 Subject: [PATCH] adpcm: Unbreak ima-dk4 Was broken by commit b9dea1a085c4705e480bd17dfa8c8ce227fdce76 Signed-off-by: Michael Niedermayer --- libavcodec/adpcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index f22c0db19b..149fee1381 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -717,7 +717,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, src++; *samples++ = cs->predictor; } - for (n = (nb_samples >> (1 - st)) - 1; n > 0; n--) { + for (n = (nb_samples >> (1 - st)) - 1; n > 0; n--, src++) { uint8_t v = *src; *samples++ = adpcm_ima_expand_nibble(&c->status[0 ], v >> 4 , 3); *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);