diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2019-11-11 21:49:41 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2019-11-11 21:54:26 +0000 |
commit | 8ad55e23fdf375278dfb381b9641596e0852a9d8 (patch) | |
tree | 2fd5582e356062aeab8e0cb07d7f1806d0015f3c | |
parent | 8e1154eb1cef4e102504fae25fb9805040d37226 (diff) | |
download | netsurf-8ad55e23fdf375278dfb381b9641596e0852a9d8.tar.gz netsurf-8ad55e23fdf375278dfb381b9641596e0852a9d8.tar.bz2 |
gif: Change how we rate-limit frames to match other browsers.
This makes the old minimum_gif_delay option unused.
-rw-r--r-- | content/handlers/image/gif.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/content/handlers/image/gif.c b/content/handlers/image/gif.c index fa343fbac..fa09f401c 100644 --- a/content/handlers/image/gif.c +++ b/content/handlers/image/gif.c @@ -154,8 +154,10 @@ static void nsgif_animate(void *p) /* Continue animating if we should */ if (gif->gif->loop_count >= 0) { delay = gif->gif->frames[gif->current_frame].frame_delay; - if (delay < nsoption_int(minimum_gif_delay)) - delay = nsoption_int(minimum_gif_delay); + if (delay <= 1) { + /* Assuming too fast to be intended, set default. */ + delay = 10; + } guit->misc->schedule(delay * 10, nsgif_animate, gif); } |