gtk+ r21242 - in trunk: . gdk-pixbuf



Author: bjornl
Date: Fri Aug 29 22:21:32 2008
New Revision: 21242
URL: http://svn.gnome.org/viewvc/gtk+?rev=21242&view=rev

Log:
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.


Modified:
   trunk/ChangeLog
   trunk/gdk-pixbuf/io-gif.c

Modified: trunk/gdk-pixbuf/io-gif.c
==============================================================================
--- trunk/gdk-pixbuf/io-gif.c	(original)
+++ trunk/gdk-pixbuf/io-gif.c	Fri Aug 29 22:21:32 2008
@@ -874,10 +874,14 @@
                 /* 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" */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]