summaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2008-08-24 12:52:38 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2008-08-24 12:52:38 +0000
commitb346730f4f93cd00b72d90f2b7267728b1265fd0 (patch)
tree8f1306628b07f35affcbdc1fee34e4971bd4b81b /image
parentb89e953bc802cd9fdb34b35653e5be7836f1e513 (diff)
downloadnetsurf-b346730f4f93cd00b72d90f2b7267728b1265fd0.tar.gz
netsurf-b346730f4f93cd00b72d90f2b7267728b1265fd0.tar.bz2
Fix get_frame to correctly catch up with current frame. Thanks to dynis.
svn path=/trunk/netsurf/; revision=5193
Diffstat (limited to 'image')
-rw-r--r--image/gif.c5
1 files changed, 4 insertions, 1 deletions
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;
}