aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-03 14:39:08 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-03 18:54:14 +0200
commit629fcda4dace5e817f5d407453774b2dc295c0e8 (patch)
treeb2d0c85e2ab5001d1d05aee701a1ee9056a168c8 /libavfilter
parent9f6ca28e329e426eacbb82ad77aead13dfb9e8c6 (diff)
downloadffmpeg-629fcda4dace5e817f5d407453774b2dc295c0e8.tar.gz
avfilter/avf_showfreqs: Use floating point division in WFUNC_BHANN
Fixes: CID1322365 Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avf_showfreqs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/avf_showfreqs.c b/libavfilter/avf_showfreqs.c
index a1ef0bf816..cbbf040c79 100644
--- a/libavfilter/avf_showfreqs.c
+++ b/libavfilter/avf_showfreqs.c
@@ -208,7 +208,7 @@ static void generate_window_func(float *lut, int N, int win_func, float *overlap
break;
case WFUNC_BHANN:
for (n = 0; n < N; n++)
- lut[n] = 0.62-0.48*FFABS(n/(N-1)-.5)-0.38*cos(2*M_PI*n/(N-1));
+ lut[n] = 0.62-0.48*FFABS(n/(double)(N-1)-.5)-0.38*cos(2*M_PI*n/(N-1));
*overlap = 0.5;
break;
case WFUNC_SINE: