summaryrefslogtreecommitdiffstats
path: root/libavcodec/g729postfilter.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-27 23:12:42 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-27 23:12:42 +0200
commit1fc28cf1644e813f57dcdcf687e77dc3167b9823 (patch)
treed3d953dcad57b80d6024eed51e8fc15685a536f5 /libavcodec/g729postfilter.c
parentd03defa778bd5778c2873fb11bb01e22fac7d96a (diff)
downloadffmpeg-streaming-1fc28cf1644e813f57dcdcf687e77dc3167b9823.zip
ffmpeg-streaming-1fc28cf1644e813f57dcdcf687e77dc3167b9823.tar.gz
avcodec/g729postfilter: avoid potential negative shift
Fixes CID1194402 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/g729postfilter.c')
-rw-r--r--libavcodec/g729postfilter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/g729postfilter.c b/libavcodec/g729postfilter.c
index fc90374..bcf509c 100644
--- a/libavcodec/g729postfilter.c
+++ b/libavcodec/g729postfilter.c
@@ -389,7 +389,7 @@ static int16_t long_term_filter(DSPContext *dsp, int pitch_delay_int,
lt_filt_factor_a = (gain_den << 15) / (gain_den + gain_num);
}
#else
- L64_temp0 = ((int64_t)gain_num) << (sh_gain_num - 1);
+ L64_temp0 = (((int64_t)gain_num) << sh_gain_num) >> 1;
L64_temp1 = ((int64_t)gain_den) << sh_gain_den;
lt_filt_factor_a = FFMAX((L64_temp1 << 15) / (L64_temp1 + L64_temp0), MIN_LT_FILT_FACTOR_A);
#endif
OpenPOWER on IntegriCloud