[FFmpeg-cvslog] gif: fix invalid signed shifts

Mans Rullgard git at videolan.org
Sun Nov 27 00:39:12 CET 2011


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Fri Nov 25 17:51:10 2011 +0000| [3bd1162a52cafc1bb758b25636e857c94fd3999c] | committer: Mans Rullgard

gif: fix invalid signed shifts

Signed-off-by: Mans Rullgard <mans at mansr.com>

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

 libavcodec/gifdec.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index bf40da1..9bac254 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -96,11 +96,11 @@ static int gif_read_image(GifState *s)
     n = (1 << bits_per_pixel);
     spal = palette;
     for(i = 0; i < n; i++) {
-        s->image_palette[i] = (0xff << 24) | AV_RB24(spal);
+        s->image_palette[i] = (0xffu << 24) | AV_RB24(spal);
         spal += 3;
     }
     for(; i < 256; i++)
-        s->image_palette[i] = (0xff << 24);
+        s->image_palette[i] = (0xffu << 24);
     /* handle transparency */
     if (s->transparent_color_index >= 0)
         s->image_palette[s->transparent_color_index] = 0;



More information about the ffmpeg-cvslog mailing list