From 5cd07246cf1e87f099c88e89c6aa0a4cfb3b202b Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Sun, 7 Feb 2010 23:58:57 -0500 Subject: [PATCH] liblbx: Clear the image mask when backtracking frames. Without this, undrawn pixels in the first frame will have the pixel values from the previously drawn frame. --- src/image.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/image.c b/src/image.c index 9ad154a..76fbfed 100644 --- a/src/image.c +++ b/src/image.c @@ -291,8 +291,10 @@ unsigned char **lbximg_getframe(struct lbx_image *img, int frame) memset(img->mask[0], 0, img->width * img->height); } else { /* Start over if we are backtracking. */ - if (img->currentframe > frame) + if (img->currentframe > frame) { + memset(img->mask[0], 0, img->width * img->height); img->currentframe = -1; + } /* We must have previous frame decoded to continue. */ if (frame > img->currentframe + 1) { -- 2.43.0