Oops, fix NaN test
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Thu, 17 May 2018 19:26:19 +0000 (15:26 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Thu, 17 May 2018 19:26:19 +0000 (15:26 -0400)
celt/celt_encoder.c

index ad0ebf0..66b5f00 100644 (file)
@@ -1724,7 +1724,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
    compute_mdcts(mode, shortBlocks, in, freq, C, CC, LM, st->upsample, st->arch);
    /* This should catch any NaN in the CELT input. Since we're not supposed to see any (they're filtered
       at the Opus layer), just abort. */
-   celt_assert(!celt_isnan(freq[0]) && (C==1 || !celt_isnan(freq[C*N])));
+   celt_assert(!celt_isnan(freq[0]) && (C==1 || !celt_isnan(freq[N])));
    if (CC==2&&C==1)
       tf_chan = 0;
    compute_band_energies(mode, freq, bandE, effEnd, C, LM, st->arch);