From b346730f4f93cd00b72d90f2b7267728b1265fd0 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 24 Aug 2008 12:52:38 +0000 Subject: Fix get_frame to correctly catch up with current frame. Thanks to dynis. svn path=/trunk/netsurf/; revision=5193 --- image/gif.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'image') diff --git a/image/gif.c b/image/gif.c index cb0970b42..b214d3a0d 100644 --- a/image/gif.c +++ b/image/gif.c @@ -196,6 +196,7 @@ void nsgif_destroy(struct content *c) */ gif_result nsgif_get_frame(struct content *c) { int previous_frame, current_frame, frame; + gif_result res = GIF_OK; current_frame = c->data.gif.current_frame; if (!option_animate_images) @@ -205,7 +206,9 @@ gif_result nsgif_get_frame(struct content *c) { else previous_frame = c->data.gif.gif->decoded_frame + 1; for (frame = previous_frame; frame <= current_frame; frame++) - return gif_decode_frame(c->data.gif.gif, frame); + res = gif_decode_frame(c->data.gif.gif, frame); + + return res; } -- cgit v1.2.3