summaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2008-12-30 13:23:36 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2008-12-30 13:23:36 +0000
commit95039df607644c6b4836f5dda61213a77d65dfd5 (patch)
tree3f3f619a531d3862a8551e8c7115251f0c99048f /image
parent77972a5056fa0e9c2c57390ac110aaeae9bfdce1 (diff)
downloadnetsurf-95039df607644c6b4836f5dda61213a77d65dfd5.tar.gz
netsurf-95039df607644c6b4836f5dda61213a77d65dfd5.tar.bz2
If a GIF has insufficient frame data, display the frames that have been decoded.
svn path=/trunk/netsurf/; revision=5947
Diffstat (limited to 'image')
-rw-r--r--image/gif.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/image/gif.c b/image/gif.c
index a353d2e9c..433f7d823 100644
--- a/image/gif.c
+++ b/image/gif.c
@@ -92,10 +92,9 @@ bool nsgif_convert(struct content *c, int iwidth, int iheight)
do {
res = gif_initialise(gif, c->source_size,
(unsigned char *)c->source_data);
- if (res != GIF_OK && res != GIF_WORKING) {
+ if (res != GIF_OK && res != GIF_WORKING && res != GIF_INSUFFICIENT_FRAME_DATA) {
switch (res)
{
- case GIF_INSUFFICIENT_FRAME_DATA:
case GIF_FRAME_DATA_ERROR:
case GIF_INSUFFICIENT_DATA:
case GIF_DATA_ERROR:
@@ -109,7 +108,7 @@ bool nsgif_convert(struct content *c, int iwidth, int iheight)
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
return false;
}
- } while (res != GIF_OK);
+ } while (res != GIF_OK && res != GIF_INSUFFICIENT_FRAME_DATA);
/* Abort on bad GIFs */
if ((gif->frame_count_partial == 0) || (gif->width == 0) ||