avcodec/aacdec_template: fix integer overflow in imdct_and_windowing()
[ffmpeg.git] / libavcodec / aacdec_template.c
index 28765c7..6e086e0 100644 (file)
@@ -2659,7 +2659,7 @@ static void imdct_and_windowing(AACContext *ac, SingleChannelElement *sce)
         ac->mdct.imdct_half(&ac->mdct, buf, in);
 #if USE_FIXED
         for (i=0; i<1024; i++)
-          buf[i] = (buf[i] + 4) >> 3;
+          buf[i] = (buf[i] + 4LL) >> 3;
 #endif /* USE_FIXED */
     }