Evas: Update for giflib 5.1 api change

Summary: Slight change in the file close function.

Reviewers: jpeg

CC: cedric

Differential Revision: https://phab.enlightenment.org/D916
This commit is contained in:
Doug Newgard 2014-05-30 08:29:49 +09:00 committed by Jean-Philippe Andre
parent 177135ff0d
commit 096ae0e86f
1 changed files with 16 additions and 0 deletions

View File

@ -528,7 +528,11 @@ evas_image_load_file_head_gif2(void *loader_data,
ret = EINA_TRUE;
on_error: // jump here on any errors to clean up
#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
if (gif) DGifCloseFile(gif, NULL);
#else
if (gif) DGifCloseFile(gif);
#endif
if (fi.map) eina_file_map_free(f, fi.map);
return ret;
}
@ -606,7 +610,11 @@ open_file:
// start as we have nothnig to build on
if ((index > 0) && (index < loader->imgnum) && (animated->animated))
{
#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
if (loader->gif) DGifCloseFile(loader->gif, NULL);
#else
if (loader->gif) DGifCloseFile(loader->gif);
#endif
if ((loader->fi.map) && (loader->f))
eina_file_map_free(loader->f, loader->fi.map);
loader->gif = NULL;
@ -764,7 +772,11 @@ open_file:
loader->imgnum = imgnum;
if ((animated->frame_count <= 1) || (rec == TERMINATE_RECORD_TYPE))
{
#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
if (loader->gif) DGifCloseFile(loader->gif, NULL);
#else
if (loader->gif) DGifCloseFile(loader->gif);
#endif
if ((loader->fi.map) && (loader->f))
eina_file_map_free(loader->f, loader->fi.map);
loader->gif = NULL;
@ -848,7 +860,11 @@ static void
evas_image_load_file_close_gif2(void *loader_data)
{
Loader_Info *loader = loader_data;
#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
if (loader->gif) DGifCloseFile(loader->gif, NULL);
#else
if (loader->gif) DGifCloseFile(loader->gif);
#endif
if ((loader->fi.map) && (loader->f))
eina_file_map_free(loader->f, loader->fi.map);
free(loader);