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

mypopy at gmail.com mypopy at gmail.com
Mon May 13 04:31:11 EEST 2019


On Sat, May 11, 2019 at 12:06 AM Jun Zhao <mypopydev at gmail.com> wrote:
>
> 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
>
Pushed, Thanks


More information about the ffmpeg-devel mailing list