summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAidan Richmond <aidan.is@hotmail.co.uk>2021-04-25 21:00:02 +0100
committerZane van Iperen <zane@zanevaniperen.com>2021-04-26 19:56:32 +1000
commit50442540d07aa7734c2df8459c711531c21d325e (patch)
treea5975956c67ddbcc6eceb0431c3d07572d1ae2c5 /libavcodec
parent7a6ea6ce2a1cf2c72b51a7557f39d540f3e75f8f (diff)
avcodec/adpcm: Fixes output from Westwood ADPCM.
Fixes bug #9198 Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Aidan Richmond <aidan.is@hotmail.co.uk> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/adpcm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index b031e24981..87ec91d6e8 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -1400,16 +1400,16 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
for (n = nb_samples / 2; n > 0; n--) {
int v = bytestream2_get_byteu(&gb);
- *smp++ = adpcm_ima_expand_nibble(&c->status[channel], v >> 4 , 3);
*smp++ = adpcm_ima_expand_nibble(&c->status[channel], v & 0x0F, 3);
+ *smp++ = adpcm_ima_expand_nibble(&c->status[channel], v >> 4 , 3);
}
}
} else {
for (n = nb_samples / 2; n > 0; n--) {
for (channel = 0; channel < avctx->channels; channel++) {
int v = bytestream2_get_byteu(&gb);
- *samples++ = adpcm_ima_expand_nibble(&c->status[channel], v >> 4 , 3);
- samples[st] = adpcm_ima_expand_nibble(&c->status[channel], v & 0x0F, 3);
+ *samples++ = adpcm_ima_expand_nibble(&c->status[channel], v & 0x0F, 3);
+ samples[st] = adpcm_ima_expand_nibble(&c->status[channel], v >> 4 , 3);
}
samples += avctx->channels;
}