shithub: opus

Download patch

ref: 679dfbab584d27154e3399f645aa19b04ca937cf
parent: 5d8a1313d621491a2bd6743740ef5385d9a6d89d
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Wed Jul 11 13:41:35 EDT 2018

Fix NaN issue

--- a/dnn/pitch.c
+++ b/dnn/pitch.c
@@ -42,6 +42,7 @@
 //#include "mathops.h"
 #include "celt_lpc.h"
 #include "math.h"
+#include <stdio.h>
 
 static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len,
                             int max_pitch, int *best_pitch
@@ -165,6 +166,7 @@
 #else
    ac[0] *= 1.0001f;
 #endif
+   ac[0] += EPSILON;
    /* Lag windowing */
    for (i=1;i<=4;i++)
    {
--