mirror of
https://github.com/xiph/opus.git
synced 2025-05-31 07:37:42 +00:00
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
This commit is contained in:
parent
69bcb28d3d
commit
7e3352ef51
29 changed files with 96 additions and 96 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue