]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/gifdec.c
aacenc: Fix issues with huge values of bit_rate.
[ffmpeg] / libavcodec / gifdec.c
index 934c944a5b723c3d0de702a6c604a0d2233de6f9..d44a535a151e0c35e5fb360b59c93331df113abe 100644 (file)
@@ -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;
@@ -326,14 +326,13 @@ static av_cold int gif_decode_close(AVCodecContext *avctx)
 }
 
 AVCodec ff_gif_decoder = {
-    "gif",
-    AVMEDIA_TYPE_VIDEO,
-    CODEC_ID_GIF,
-    sizeof(GifState),
-    gif_decode_init,
-    NULL,
-    gif_decode_close,
-    gif_decode_frame,
-    CODEC_CAP_DR1,
-    .long_name = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"),
+    .name           = "gif",
+    .type           = AVMEDIA_TYPE_VIDEO,
+    .id             = CODEC_ID_GIF,
+    .priv_data_size = sizeof(GifState),
+    .init           = gif_decode_init,
+    .close          = gif_decode_close,
+    .decode         = gif_decode_frame,
+    .capabilities   = CODEC_CAP_DR1,
+    .long_name      = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"),
 };