diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-09-15 17:24:40 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-09-15 17:24:40 +0200 |
commit | b82c1a377a2b11663561189208f57c6c639f8ec6 (patch) | |
tree | 1fe782f97aa91abca36539262c4eff3273395350 | |
parent | 4d677c7ae37d1df57cc79ea7577c2e4cd1de8e3a (diff) | |
download | ffmpeg-b82c1a377a2b11663561189208f57c6c639f8ec6.tar.gz |
avcodec/adpcm: clip step for ADPCM MTAF decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavcodec/adpcm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 06ba83e3c3..cb7f644f66 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -909,8 +909,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, case AV_CODEC_ID_ADPCM_MTAF: for (channel = 0; channel < avctx->channels; channel+=2) { bytestream2_skipu(&gb, 4); - c->status[channel ].step = bytestream2_get_le16u(&gb); - c->status[channel + 1].step = bytestream2_get_le16u(&gb); + c->status[channel ].step = bytestream2_get_le16u(&gb) & 0x1f; + c->status[channel + 1].step = bytestream2_get_le16u(&gb) & 0x1f; c->status[channel ].predictor = sign_extend(bytestream2_get_le16u(&gb), 16); bytestream2_skipu(&gb, 2); c->status[channel + 1].predictor = sign_extend(bytestream2_get_le16u(&gb), 16); |