diff --git a/libavcodec/mdct.c b/libavcodec/mdct.c index fe19f1ff3d..0447c64124 100644 --- a/libavcodec/mdct.c +++ b/libavcodec/mdct.c @@ -59,9 +59,10 @@ float *ff_sine_windows[5] = { // Generate a sine window. void ff_sine_window_init(float *window, int n) { + float alpha = M_PI / (2.0 * n); int i; for(i = 0; i < n; i++) - window[i] = sin((i + 0.5) / (2 * n) * M_PI); + window[i] = sin((i + 0.5) * alpha); } /**