From 133fc5f4a07afb426aa774d8e0e5edab545545b2 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Wed, 11 Jul 2018 17:41:35 -0400 Subject: [PATCH] Fix NaN issue --- src/pitch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pitch.c b/src/pitch.c index 8bccd23..11d9122 100644 --- a/src/pitch.c +++ b/src/pitch.c @@ -42,6 +42,7 @@ //#include "mathops.h" #include "celt_lpc.h" #include "math.h" +#include static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len, int max_pitch, int *best_pitch @@ -165,6 +166,7 @@ void pitch_downsample(opus_val16 *x_lp, #else ac[0] *= 1.0001f; #endif + ac[0] += EPSILON; /* Lag windowing */ for (i=1;i<=4;i++) {