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

Ganesh Ajjanagadde gajjanagadde at gmail.com
Sat Sep 19 06:57:24 CEST 2015


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>
---
 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;
-- 
2.5.2



More information about the ffmpeg-devel mailing list