avcodec/adpcm_ima_apm: cosmetics

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
This commit is contained in:
Zane van Iperen 2021-02-18 13:48:38 +10:00
parent a859e57424
commit 1ab74bc193
No known key found for this signature in database
GPG Key ID: 68616B2D8AC4DCC5

View File

@ -2101,13 +2101,11 @@ static void adpcm_flush(AVCodecContext *avctx)
break;
case AV_CODEC_ID_ADPCM_IMA_APM:
if (avctx->extradata) {
if (avctx->extradata_size >= 28) {
c->status[0].predictor = av_clip_intp2(AV_RL32(avctx->extradata + 16), 18);
c->status[0].step_index = av_clip(AV_RL32(avctx->extradata + 20), 0, 88);
c->status[1].predictor = av_clip_intp2(AV_RL32(avctx->extradata + 4), 18);
c->status[1].step_index = av_clip(AV_RL32(avctx->extradata + 8), 0, 88);
}
if (avctx->extradata && avctx->extradata_size >= 28) {
c->status[0].predictor = av_clip_intp2(AV_RL32(avctx->extradata + 16), 18);
c->status[0].step_index = av_clip(AV_RL32(avctx->extradata + 20), 0, 88);
c->status[1].predictor = av_clip_intp2(AV_RL32(avctx->extradata + 4), 18);
c->status[1].step_index = av_clip(AV_RL32(avctx->extradata + 8), 0, 88);
}
break;