diff options
Diffstat (limited to 'gdk-pixbuf/io-gif-animation.c')
-rw-r--r-- | gdk-pixbuf/io-gif-animation.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/gdk-pixbuf/io-gif-animation.c b/gdk-pixbuf/io-gif-animation.c index 2befadf84..971801ee8 100644 --- a/gdk-pixbuf/io-gif-animation.c +++ b/gdk-pixbuf/io-gif-animation.c @@ -285,21 +285,17 @@ gdk_pixbuf_gif_anim_iter_advance (GdkPixbufAnimationIter *anim_iter, * and subtract time for that. */ - if (iter->gif_anim->loading) - loop = 0; - else { - /* If current_frame is NULL at this point, we have loaded the - * animation from a source which fell behind the speed of the - * display. We remember how much slower the first loop was due - * to this and correct the position calculation in order to not - * jump in the middle of the second loop. - */ - if (iter->current_frame == NULL) - iter->first_loop_slowness = MAX(0, elapsed - iter->gif_anim->total_time); + /* If current_frame is NULL at this point, we have loaded the + * animation from a source which fell behind the speed of the + * display. We remember how much slower the first loop was due + * to this and correct the position calculation in order to not + * jump in the middle of the second loop. + */ + if (iter->current_frame == NULL) + iter->first_loop_slowness = MAX(0, elapsed - iter->gif_anim->total_time); - loop = (elapsed - iter->first_loop_slowness) / iter->gif_anim->total_time; - elapsed = (elapsed - iter->first_loop_slowness) % iter->gif_anim->total_time; - } + loop = (elapsed - iter->first_loop_slowness) / iter->gif_anim->total_time; + elapsed = (elapsed - iter->first_loop_slowness) % iter->gif_anim->total_time; iter->position = elapsed; |