summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorBjörn Lindqvist <bjourne@gmail.com>2008-08-29 22:21:32 +0000
committerBjörn Lindqvist <bjornl@src.gnome.org>2008-08-29 22:21:32 +0000
commit2560bc66cd65928e42de6ba668635d46ed68e1fb (patch)
treebab73a5f36bee91b287f54e75ffc6b5dbefa5a01 /gdk-pixbuf
parent87753df6cc10184cb5c5aaf42d40e8982e05c8fb (diff)
downloadgdk-pixbuf-2560bc66cd65928e42de6ba668635d46ed68e1fb.tar.gz
Bug 437791 – Animation is played at the wrong speed
2008-08-29 Björn Lindqvist <bjourne@gmail.com> Bug 437791 – Animation is played at the wrong speed * gdk-pixbuf/io-gif.c (gif_get_lzw): Better 100 ms timeout for broken GIFs with 0 frame timeout. svn path=/trunk/; revision=21242
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/io-gif.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c
index ef5a7213f..0a5803fb0 100644
--- a/gdk-pixbuf/io-gif.c
+++ b/gdk-pixbuf/io-gif.c
@@ -874,10 +874,14 @@ gif_get_lzw (GifContext *context)
/* GIF delay is in hundredths, we want thousandths */
context->frame->delay_time = context->gif89.delay_time * 10;
- /* Some GIFs apparently have delay time of 0,
- * that crashes everything so set it to "fast".
- * Also, timeouts less than 20 or so just lock up
- * the app or make the animation choppy, so fix them.
+ /* GIFs with delay time 0 are mostly broken, but they
+ * just want a default, "not that fast" delay.
+ */
+ if (context->frame->delay_time == 0)
+ context->frame->delay_time = 100;
+
+ /* No GIFs gets to play faster than 50 fps. They just
+ * lock up poor gtk.
*/
if (context->frame->delay_time < 20)
context->frame->delay_time = 20; /* 20 = "fast" */