diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2018-03-24 09:16:15 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2018-03-27 22:13:27 +0300 |
commit | 7e3352ef517379c9ab42a2416b444882ff86aec6 (patch) | |
tree | 0d53c0120e5225689563dc4cf7cd1632df6cabbb /silk/decoder_set_fs.c | |
parent | 69bcb28d3ddb20231580bd09e44d87a769dabcb7 (diff) |
Converting some silk_assert()s into hardening celt_assert()s
Only converted the ones that are really sure (not signal-dependent)
and that shouldn't add much run-time complexity
Diffstat (limited to 'silk/decoder_set_fs.c')
-rw-r--r-- | silk/decoder_set_fs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/silk/decoder_set_fs.c b/silk/decoder_set_fs.c index eef0fd25..d9a13d0f 100644 --- a/silk/decoder_set_fs.c +++ b/silk/decoder_set_fs.c @@ -40,8 +40,8 @@ opus_int silk_decoder_set_fs( { opus_int frame_length, ret = 0; - silk_assert( fs_kHz == 8 || fs_kHz == 12 || fs_kHz == 16 ); - silk_assert( psDec->nb_subfr == MAX_NB_SUBFR || psDec->nb_subfr == MAX_NB_SUBFR/2 ); + celt_assert( fs_kHz == 8 || fs_kHz == 12 || fs_kHz == 16 ); + celt_assert( psDec->nb_subfr == MAX_NB_SUBFR || psDec->nb_subfr == MAX_NB_SUBFR/2 ); /* New (sub)frame length */ psDec->subfr_length = silk_SMULBB( SUB_FRAME_LENGTH_MS, fs_kHz ); @@ -86,7 +86,7 @@ opus_int silk_decoder_set_fs( psDec->pitch_lag_low_bits_iCDF = silk_uniform4_iCDF; } else { /* unsupported sampling rate */ - silk_assert( 0 ); + celt_assert( 0 ); } psDec->first_frame_after_reset = 1; psDec->lagPrev = 100; @@ -101,7 +101,7 @@ opus_int silk_decoder_set_fs( } /* Check that settings are valid */ - silk_assert( psDec->frame_length > 0 && psDec->frame_length <= MAX_FRAME_LENGTH ); + celt_assert( psDec->frame_length > 0 && psDec->frame_length <= MAX_FRAME_LENGTH ); return ret; } |