[FFmpeg-cvslog] avcodec/adpcm_ima_apm: cosmetics

Zane van Iperen git at videolan.org
Wed Apr 28 06:23:02 EEST 2021


ffmpeg | branch: master | Zane van Iperen <zane at zanevaniperen.com> | Thu Feb 18 13:48:38 2021 +1000| [1ab74bc19354aedfb9afe71515952254753a75cc] | committer: Zane van Iperen

avcodec/adpcm_ima_apm: cosmetics

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
Signed-off-by: Zane van Iperen <zane at zanevaniperen.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ab74bc19354aedfb9afe71515952254753a75cc
---

 libavcodec/adpcm.c | 12 +++++-------
 1 file 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;
 



More information about the ffmpeg-cvslog mailing list