diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index 8fe7b5ee86..388d851d03 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -1333,7 +1333,7 @@ static void do_apply_filter(APEContext *ctx, int version, APEFilter *f, /* Version 3.98 and later files */ /* Update the adaption coefficients */ - absres = FFABS(res); + absres = FFABSU(res); if (absres) *f->adaptcoeffs = APESIGN(res) * (8 << ((absres > f->avg * 3) + (absres > f->avg * 4 / 3)));