summaryrefslogtreecommitdiff
path: root/riscos/gif.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2004-06-09 23:15:34 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2004-06-09 23:15:34 +0000
commitb6570bb7a8e5ff9289713c5aa3cdaacf77df11ba (patch)
tree0674475542bdf7c0f8c38262bd1a928580807f27 /riscos/gif.c
parent035eaa78499be49457184886b6ec338b4030ac33 (diff)
downloadnetsurf-b6570bb7a8e5ff9289713c5aa3cdaacf77df11ba.tar.gz
netsurf-b6570bb7a8e5ff9289713c5aa3cdaacf77df11ba.tar.bz2
[project @ 2004-06-09 23:15:34 by rjw]
Fix for bounding box calculations with clear codes. The first frame is decoded when the GIF is initialised. svn path=/import/netsurf/; revision=945
Diffstat (limited to 'riscos/gif.c')
-rw-r--r--riscos/gif.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/riscos/gif.c b/riscos/gif.c
index 79b6d44ad..e15c5ebe4 100644
--- a/riscos/gif.c
+++ b/riscos/gif.c
@@ -78,6 +78,11 @@ int nsgif_convert(struct content *c, unsigned int iwidth, unsigned int iheight)
schedule(gif->frames[0].frame_delay, nsgif_animate, c);
}
+ /* Initialise the first frame so if we try to use the image data directly prior to
+ a plot we get some sensible data
+ */
+ gif_decode_frame(c->data.gif.gif, 0);
+
/* Exit as a success
*/
c->status = CONTENT_STATUS_DONE;
@@ -94,10 +99,6 @@ void nsgif_redraw(struct content *c, long x, long y,
unsigned int frame, current_frame;
unsigned int tinct_options;
- /* Reject no images (paranoia)
- */
- if (c->data.gif.gif->frame_count_partial < 1) return;
-
/* If we have a gui_window then we work from there, if not we use the global
settings. We default to the first image if we don't have a GUI as we are
drawing a thumbnail unless something has gone very wrong somewhere else.
@@ -145,7 +146,6 @@ void nsgif_redraw(struct content *c, long x, long y,
}
-
void nsgif_destroy(struct content *c)
{
/* Free all the associated memory buffers
@@ -156,7 +156,6 @@ void nsgif_destroy(struct content *c)
}
-
/** Performs any necessary animation.
@param c The content to animate