Commit f9bd3056 authored by Reimar Döffinger's avatar Reimar Döffinger

clip MS ADPCM predictor range to correct [0..6] range, not [0..7]

Originally committed as revision 14203 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 962fe7e1
...@@ -1025,10 +1025,10 @@ static int adpcm_decode_frame(AVCodecContext *avctx, ...@@ -1025,10 +1025,10 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
n = buf_size - 7 * avctx->channels; n = buf_size - 7 * avctx->channels;
if (n < 0) if (n < 0)
return -1; return -1;
block_predictor[0] = av_clip(*src++, 0, 7); block_predictor[0] = av_clip(*src++, 0, 6);
block_predictor[1] = 0; block_predictor[1] = 0;
if (st) if (st)
block_predictor[1] = av_clip(*src++, 0, 7); block_predictor[1] = av_clip(*src++, 0, 6);
c->status[0].idelta = (int16_t)bytestream_get_le16(&src); c->status[0].idelta = (int16_t)bytestream_get_le16(&src);
if (st){ if (st){
c->status[1].idelta = (int16_t)bytestream_get_le16(&src); c->status[1].idelta = (int16_t)bytestream_get_le16(&src);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment