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
This commit is contained in:
Taehyub Kim 2021-05-24 19:48:22 +09:00 committed by Hermet Park
parent 3db14bf8dd
commit 25aced168a
1 changed files with 6 additions and 4 deletions

View File

@ -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;