Use 100 ms as the default GIF animation delay if it's not specified, or very small.
authorSam Lantinga <slouken@libsdl.org>
Wed, 09 Oct 2019 17:25:15 -0700
changeset 7212ab0052024a3
parent 720 58e4a9ae8cd2
child 722 63ec5ac0b0b8
Use 100 ms as the default GIF animation delay if it's not specified, or very small.
This is compatible with IE, Mozilla, and Qt.
IMG_gif.c
     1.1 --- a/IMG_gif.c	Wed Oct 09 20:30:10 2019 +0300
     1.2 +++ b/IMG_gif.c	Wed Oct 09 17:25:15 2019 -0700
     1.3 @@ -332,7 +332,7 @@
     1.4              frame->x = LM_to_uint(buf[0], buf[1]);
     1.5              frame->y = LM_to_uint(buf[2], buf[3]);
     1.6              frame->disposal = state.Gif89.disposal;
     1.7 -            frame->delay = state.Gif89.delayTime*10;
     1.8 +            frame->delay = (state.Gif89.delayTime < 2 ? 10 : state.Gif89.delayTime) * 10;
     1.9  
    1.10              if (!load_anim) {
    1.11                  /* We only need one frame, we're done */