summaryrefslogtreecommitdiff
path: root/media/libopus/silk/gain_quant.c
diff options
context:
space:
mode:
Diffstat (limited to 'media/libopus/silk/gain_quant.c')
-rw-r--r--media/libopus/silk/gain_quant.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/media/libopus/silk/gain_quant.c b/media/libopus/silk/gain_quant.c
index 64ccd0611b..ee65245aa3 100644
--- a/media/libopus/silk/gain_quant.c
+++ b/media/libopus/silk/gain_quant.c
@@ -76,6 +76,7 @@ void silk_gains_quant(
/* Accumulate deltas */
if( ind[ k ] > double_step_size_threshold ) {
*prev_ind += silk_LSHIFT( ind[ k ], 1 ) - double_step_size_threshold;
+ *prev_ind = silk_min_int( *prev_ind, N_LEVELS_QGAIN - 1 );
} else {
*prev_ind += ind[ k ];
}