From bba28df0cc0c75338a63645c6a55aebfebe91c74 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 5 Apr 2021 14:42:04 +0100 Subject: test decode: Skip frames that are not meant for display. --- test/decode_gif.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/decode_gif.c b/test/decode_gif.c index 619be29..64387ef 100644 --- a/test/decode_gif.c +++ b/test/decode_gif.c @@ -161,6 +161,10 @@ static void write_ppm(FILE* fh, const char *name, gif_animation *gif, if (code != GIF_OK) warning("gif_decode_frame", code); + if (!gif->frames[i].display) { + continue; + } + if (!no_write) { fprintf(fh, "# frame %u:\n", i); image = (unsigned char *) gif->frame_image; -- cgit v1.2.3