diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-27 23:12:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-27 23:12:42 +0200 |
commit | 1fc28cf1644e813f57dcdcf687e77dc3167b9823 (patch) | |
tree | d3d953dcad57b80d6024eed51e8fc15685a536f5 | |
parent | d03defa778bd5778c2873fb11bb01e22fac7d96a (diff) | |
download | ffmpeg-1fc28cf1644e813f57dcdcf687e77dc3167b9823.tar.gz |
avcodec/g729postfilter: avoid potential negative shift
Fixes CID1194402
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/g729postfilter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/g729postfilter.c b/libavcodec/g729postfilter.c index fc903740ed..bcf509cfcc 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 |