Commit cc42669c authored by Jiaquan Huo's avatar Jiaquan Huo
Browse files

fix infinite loop

parent a984deff
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
#include "debug.h"
#endif
#include "wmc_auto.h"
#include "string.h"

/*------------------------------------------------------------------------------------------*
 * Local constants
@@ -94,6 +95,8 @@ static int16_t lfeplc_lev_dur(
    a[1] = rc[0];
    err = r[0] + r[1] * rc[0];

    memcpy(a_out, a, sizeof(a));

    if ( epsP != NULL )
    {
        epsP[0] = r[0];
@@ -318,7 +321,6 @@ static void recover_samples(
    float zeroes[LFE_PLC_RECLEN];
    float delta, fac, att;
    float r[LFE_PLC_LPCORD + 1], a[LFE_PLC_LPCORD + 1], pee[LFE_PLC_LPCORD + 1];

    autocorr(outbuf, r, LFE_PLC_LPCORD, LFE_PLC_BUFLEN, hamm_lfe_plc, 0, 1, 1 );

    if ( r[0] < POW_THR * LFE_PLC_BUFLEN )