summaryrefslogtreecommitdiff
path: root/libavcodec/adpcm.c
diff options
context:
space:
mode:
authorZane van Iperen <zane@zanevaniperen.com>2021-02-18 13:48:38 +1000
committerZane van Iperen <zane@zanevaniperen.com>2021-04-28 11:13:50 +1000
commit1ab74bc19354aedfb9afe71515952254753a75cc (patch)
tree5bf3ec06cc1c66fda77c4ea43954e1f917b7864e /libavcodec/adpcm.c
parenta859e57424ca0a00d17bdc034c52005c18184961 (diff)
avcodec/adpcm_ima_apm: cosmetics
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r--libavcodec/adpcm.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 8d94cefa0e..3da6b734cf 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -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;