[FFmpeg-devel] [PATCH] avcodec/mlpdec: fix a undefined left shift of negative number
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Sat Sep 19 07:06:46 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/mlpdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index b2d1e2f..c93b058 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -602,7 +602,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
/* Default audio coding is 24-bit raw PCM. */
cp->huff_offset = 0;
- cp->sign_huff_offset = (-1) << 23;
+ cp->sign_huff_offset = -(1 << 23);
cp->codebook = 0;
cp->huff_lsbs = 24;
}
--
2.5.2
More information about the ffmpeg-devel
mailing list