summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/g729postfilter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/g729postfilter.c b/libavcodec/g729postfilter.c
index 617744ec8e..668177c843 100644
--- a/libavcodec/g729postfilter.c
+++ b/libavcodec/g729postfilter.c
@@ -350,7 +350,7 @@ static int16_t long_term_filter(AudioDSPContext *adsp, int pitch_delay_int,
if (tmp > 0)
L_temp0 >>= tmp;
else
- L_temp1 >>= -tmp;
+ L_temp1 >>= FFMIN(-tmp, 31);
/* Check if longer filter increases the values of R'(k). */
if (L_temp1 > L_temp0) {