Commit 20777e0c authored by michael's avatar michael

fixing the remaning block-align checks


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2438 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 772c1771
......@@ -648,12 +648,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
}
break;
case CODEC_ID_ADPCM_IMA_DK4:
if (buf_size > BLKSIZE) {
if (avctx->block_align != 0)
buf_size = avctx->block_align;
else
buf_size = BLKSIZE;
}
if (avctx->block_align != 0 && buf_size > avctx->block_align)
buf_size = avctx->block_align;
c->status[0].predictor = (src[0] | (src[1] << 8));
c->status[0].step_index = src[2];
src += 4;
......@@ -687,12 +684,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
}
break;
case CODEC_ID_ADPCM_IMA_DK3:
if (buf_size > BLKSIZE) {
if (avctx->block_align != 0)
buf_size = avctx->block_align;
else
buf_size = BLKSIZE;
}
if (avctx->block_align != 0 && buf_size > avctx->block_align)
buf_size = avctx->block_align;
c->status[0].predictor = (src[10] | (src[11] << 8));
c->status[1].predictor = (src[12] | (src[13] << 8));
c->status[0].step_index = src[14];
......
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