From 95039df607644c6b4836f5dda61213a77d65dfd5 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Tue, 30 Dec 2008 13:23:36 +0000 Subject: If a GIF has insufficient frame data, display the frames that have been decoded. svn path=/trunk/netsurf/; revision=5947 --- image/gif.c | 5 ++--- 1 file 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) || -- cgit v1.2.3