[FFmpeg-devel] [PATCH] avcodec/bonk: Actually clip when using av_clip()

Paul B Mahol onemda at gmail.com
Mon Sep 12 22:20:21 EEST 2022


On 9/12/22, Andreas Rheinhardt <andreas.rheinhardt at outlook.com> wrote:
> Also fixes a "statement with no effect [-Wunused-value]"
> warning from GCC.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>  libavcodec/bonk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/bonk.c b/libavcodec/bonk.c
> index f3d797d588..409694f710 100644
> --- a/libavcodec/bonk.c
> +++ b/libavcodec/bonk.c
> @@ -280,7 +280,7 @@ static int predictor_calc_error(int *k, int *state, int
> order, int error)
>      }
>
>      // don't drift too far, to avoid overflows
> -    av_clip(x, -(SAMPLE_FACTOR << 16), SAMPLE_FACTOR << 16);
> +    x = av_clip(x, -(SAMPLE_FACTOR << 16), SAMPLE_FACTOR << 16);
>
>      state[0] = x;
>

LGTM

> --
> 2.34.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-devel mailing list