forked from enlightenment/efl
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:
parent
3db14bf8dd
commit
25aced168a
|
@ -252,8 +252,9 @@ _decode_image(GifFileType *gif, DATA32 *data, int rowpix, int xin, int yin,
|
||||||
{
|
{
|
||||||
for (yy = 0; yy < fh; yy++)
|
for (yy = 0; yy < fh; yy++)
|
||||||
{
|
{
|
||||||
if (DGifGetLine(gif, rows[yy], fw) != GIF_OK)
|
// current frame image should be shown
|
||||||
goto on_error;
|
// 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
|
// walk through gif records in file to figure out info
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
|
// if getting the recored value is failed,
|
||||||
LOADERR(EVAS_LOAD_ERROR_UNKNOWN_FORMAT);
|
// it will be retried until the termination
|
||||||
|
DGifGetRecordType(gif, &rec);
|
||||||
if (rec == EXTENSION_RECORD_TYPE)
|
if (rec == EXTENSION_RECORD_TYPE)
|
||||||
{
|
{
|
||||||
int ext_code;
|
int ext_code;
|
||||||
|
|
Loading…
Reference in New Issue