Skip to content
Snippets Groups Projects
Commit b82c1a37 authored by Paul B Mahol's avatar Paul B Mahol
Browse files

avcodec/adpcm: clip step for ADPCM MTAF decoder


Signed-off-by: default avatarPaul B Mahol <onemda@gmail.com>
parent 4d677c7a
No related branches found
No related tags found
No related merge requests found
...@@ -909,8 +909,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, ...@@ -909,8 +909,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
case AV_CODEC_ID_ADPCM_MTAF: case AV_CODEC_ID_ADPCM_MTAF:
for (channel = 0; channel < avctx->channels; channel+=2) { for (channel = 0; channel < avctx->channels; channel+=2) {
bytestream2_skipu(&gb, 4); bytestream2_skipu(&gb, 4);
c->status[channel ].step = bytestream2_get_le16u(&gb); c->status[channel ].step = bytestream2_get_le16u(&gb) & 0x1f;
c->status[channel + 1].step = bytestream2_get_le16u(&gb); c->status[channel + 1].step = bytestream2_get_le16u(&gb) & 0x1f;
c->status[channel ].predictor = sign_extend(bytestream2_get_le16u(&gb), 16); c->status[channel ].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
bytestream2_skipu(&gb, 2); bytestream2_skipu(&gb, 2);
c->status[channel + 1].predictor = sign_extend(bytestream2_get_le16u(&gb), 16); c->status[channel + 1].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment