Fix get_frame to correctly catch up with current frame. Thanks to dynis.

svn path=/trunk/netsurf/; revision=5193
This commit is contained in:
Michael Drake 2008-08-24 12:52:38 +00:00
parent b89e953bc8
commit b346730f4f

View File

@ -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;
}