[FFmpeg-cvslog] avcodec/g723_1: fix a undefined left shift of negative number

Ganesh Ajjanagadde git at videolan.org
Sat Sep 19 13:28:10 CEST 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Sat Sep 19 00:57:24 2015 -0400| [4328e1fc424b01488bab10d60d2ffc0102c054a1] | committer: Michael Niedermayer

avcodec/g723_1: fix a undefined left shift of negative number

This fixes a -Wshift-negative-value reported with clang 3.7+, e.g
http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4328e1fc424b01488bab10d60d2ffc0102c054a1
---

 libavcodec/g723_1.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index 4a73c3c..68a6d91 100644
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -2142,7 +2142,7 @@ static void get_fcb_param(FCBParam *optim, int16_t *impulse_resp,
             temp_corr[param.pulse_pos[0]] = 1;
 
             for (k = 1; k < pulse_cnt; k++) {
-                max = -1 << 30;
+                max = INT_MIN;
                 for (l = i; l < SUBFRAME_LEN; l += GRID_SIZE) {
                     if (temp_corr[l])
                         continue;



More information about the ffmpeg-cvslog mailing list