From e0288ec103809b02f407ee066209fe19a3bc35f8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 9 Oct 2019 17:25:15 -0700 Subject: [PATCH] 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IMG_gif.c b/IMG_gif.c index c6b24a02..f4c84270 100644 --- a/IMG_gif.c +++ b/IMG_gif.c @@ -332,7 +332,7 @@ IMG_LoadGIF_RW_Internal(SDL_RWops *src, SDL_bool load_anim) frame->x = LM_to_uint(buf[0], buf[1]); frame->y = LM_to_uint(buf[2], buf[3]); frame->disposal = state.Gif89.disposal; - frame->delay = state.Gif89.delayTime*10; + frame->delay = (state.Gif89.delayTime < 2 ? 10 : state.Gif89.delayTime) * 10; if (!load_anim) { /* We only need one frame, we're done */