[FFmpeg-cvslog] avcodec/vorbis: 1 << 31 > int32_t::max(), so use 1u << 31 instead.

Dale Curtis git at videolan.org
Thu Feb 1 01:52:12 EET 2018


ffmpeg | branch: release/2.8 | Dale Curtis <dalecurtis at chromium.org> | Wed Nov 22 10:58:39 2017 -0800| [1bc4e743f5618315b11478448058d8757d8c7576] | committer: Michael Niedermayer

avcodec/vorbis: 1 << 31 > int32_t::max(), so use 1u << 31 instead.

Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 9648cc6d7fdbb0a260bed1e3e23300569cff9579)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c
index 86d10407f4..61c395e71e 100644
--- a/libavcodec/vorbis.c
+++ b/libavcodec/vorbis.c
@@ -105,7 +105,7 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num)
         exit_at_level[i] = 0;
         // construct code (append 0s to end) and introduce new exits
         for (j = i + 1 ;j <= bits[p]; ++j)
-            exit_at_level[j] = code + (1 << (j - 1));
+            exit_at_level[j] = code + (1u << (j - 1));
         codes[p] = code;
 
 #ifdef DEBUG



More information about the ffmpeg-cvslog mailing list