[FFmpeg-devel] [PATCH 1/6] lavc/aacenc_ltp: remove unnecessary condition check.

Jun Zhao mypopydev at gmail.com
Fri May 10 19:05:49 EEST 2019


From: Jun Zhao <barryjzhao at tencent.com>

Condition 'sum==2' is always true, so remove the check logic to
make the code clean.

Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
---
 libavcodec/aacenc_ltp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/aacenc_ltp.c b/libavcodec/aacenc_ltp.c
index 674a2a0..f77f0b6 100644
--- a/libavcodec/aacenc_ltp.c
+++ b/libavcodec/aacenc_ltp.c
@@ -144,7 +144,7 @@ void ff_aac_adjust_common_ltp(AACEncContext *s, ChannelElement *cpe)
         int sum = sce0->ics.ltp.used[sfb] + sce1->ics.ltp.used[sfb];
         if (sum != 2) {
             sce0->ics.ltp.used[sfb] = 0;
-        } else if (sum == 2) {
+        } else {
             count++;
         }
     }
-- 
1.7.1



More information about the ffmpeg-devel mailing list