X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Faacdec_fixed.c;h=f6a533010f2ac3efff4addc9522a4d93d32d7259;hb=a6596831a03d4b56a485436f7c328a039509b8dd;hp=ccfef7f6526d7faf9ad5d51bc438321fcb9f4938;hpb=2dfb8c417891e0cc3670f8e0791ea0c7071314fe;p=ffmpeg diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c index ccfef7f6526..f6a533010f2 100644 --- a/libavcodec/aacdec_fixed.c +++ b/libavcodec/aacdec_fixed.c @@ -305,8 +305,12 @@ static av_always_inline void predict(PredictorState *ps, int *coef, if (output_enable) { int shift = 28 - pv.exp; - if (shift < 31) - *coef += (pv.mant + (1 << (shift - 1))) >> shift; + if (shift < 31) { + if (shift > 0) { + *coef += (pv.mant + (1 << (shift - 1))) >> shift; + } else + *coef += pv.mant << -shift; + } } e0 = av_int2sf(*coef, 2);