From f80400843f66140ffc1770f6065dd73899a3967d Mon Sep 17 00:00:00 2001 From: Urvang Joshi Date: Thu, 10 Mar 2016 22:44:19 +0000 Subject: [PATCH] gif2webp: Remove the 'prev_to_prev_canvas' buffer. This was never used. Change-Id: Icf50e658418b851af7b6c9c3f552cdfdfa68d6ae --- examples/gif2webp.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/gif2webp.c b/examples/gif2webp.c index 9c7da996..daf3d69e 100644 --- a/examples/gif2webp.c +++ b/examples/gif2webp.c @@ -98,7 +98,6 @@ int main(int argc, const char *argv[]) { WebPPicture frame; // Frame rectangle only (not disposed). WebPPicture curr_canvas; // Not disposed. WebPPicture prev_canvas; // Disposed. - WebPPicture prev_to_prev_canvas; // Disposed. WebPAnimEncoder* enc = NULL; WebPAnimEncoderOptions enc_options; @@ -124,8 +123,7 @@ int main(int argc, const char *argv[]) { if (!WebPConfigInit(&config) || !WebPAnimEncoderOptionsInit(&enc_options) || !WebPPictureInit(&frame) || !WebPPictureInit(&curr_canvas) || - !WebPPictureInit(&prev_canvas) || - !WebPPictureInit(&prev_to_prev_canvas)) { + !WebPPictureInit(&prev_canvas)) { fprintf(stderr, "Error! Version mismatch!\n"); return -1; } @@ -305,7 +303,6 @@ int main(int argc, const char *argv[]) { GIFClearPic(&frame, NULL); WebPPictureCopy(&frame, &curr_canvas); WebPPictureCopy(&frame, &prev_canvas); - WebPPictureCopy(&frame, &prev_to_prev_canvas); // Background color. GIFGetBackgroundColor(gif->SColorMap, gif->SBackGroundColor, @@ -342,7 +339,6 @@ int main(int argc, const char *argv[]) { } // Update canvases. - GIFCopyPixels(&prev_canvas, &prev_to_prev_canvas); GIFDisposeFrame(orig_dispose, &gif_rect, &prev_canvas, &curr_canvas); GIFCopyPixels(&curr_canvas, &prev_canvas); @@ -530,7 +526,6 @@ int main(int argc, const char *argv[]) { WebPPictureFree(&frame); WebPPictureFree(&curr_canvas); WebPPictureFree(&prev_canvas); - WebPPictureFree(&prev_to_prev_canvas); WebPAnimEncoderDelete(enc); if (out != NULL && out_file != NULL) fclose(out);