hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=25aced168a26620700f922e4eefe2dbc65a1d16e

commit 25aced168a26620700f922e4eefe2dbc65a1d16e
Author: Taehyub Kim <taehyub....@samsung.com>
Date:   Mon May 24 19:48:22 2021 +0900

    gif loader: show the current frame image if getting row is failed
    
    Summary:
    Change-Id: I17c79f89550e9a758a532babd55826b3c7ad2810
    
    To show gif animation smoothly, we keep the current frame even if getting 
line is failed.
    Currently,  the frame image will be freed if getting gif line is failed and 
this makes the frame drop.
    
    Reviewers: Hermet, kimcinoo, raster
    
    Reviewed By: raster
    
    Subscribers: raster, cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D12277
---
 src/modules/evas/image_loaders/gif/evas_image_load_gif.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/modules/evas/image_loaders/gif/evas_image_load_gif.c 
b/src/modules/evas/image_loaders/gif/evas_image_load_gif.c
index fec8f4bb09..6fd8cc6057 100644
--- a/src/modules/evas/image_loaders/gif/evas_image_load_gif.c
+++ b/src/modules/evas/image_loaders/gif/evas_image_load_gif.c
@@ -252,8 +252,9 @@ _decode_image(GifFileType *gif, DATA32 *data, int rowpix, 
int xin, int yin,
      {
         for (yy = 0; yy < fh; yy++)
           {
-             if (DGifGetLine(gif, rows[yy], fw) != GIF_OK)
-               goto on_error;
+             // current frame image should be shown
+             // even if the current line is not complete.
+             DGifGetLine(gif, rows[yy], fw);
           }
      }
 
@@ -659,8 +660,9 @@ open_file:
    // walk through gif records in file to figure out info
    do
      {
-        if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
-          LOADERR(EVAS_LOAD_ERROR_UNKNOWN_FORMAT);
+        // if getting the recored value is failed,
+        // it will be retried until the termination
+        DGifGetRecordType(gif, &rec);
         if (rec == EXTENSION_RECORD_TYPE)
           {
              int                 ext_code;

-- 


Reply via email to