summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Newgard <scimmia22@outlook.com>2014-05-30 08:29:49 +0900
committerNicolas Aguirre <aguirre.nicolas@gmail.com>2014-07-04 08:42:52 +0200
commitcb410fc8a634a9bea6517492050b2c63f88fdd90 (patch)
tree06d8eb7435ab4487025f89d9f6ba9173cff737b4
parent45f526580bd3dd2aa1c38b409200abd22fd31b95 (diff)
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
-rw-r--r--src/modules/evas/loaders/gif/evas_image_load_gif.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/modules/evas/loaders/gif/evas_image_load_gif.c b/src/modules/evas/loaders/gif/evas_image_load_gif.c
index 29ead8e92e..9633411631 100644
--- a/src/modules/evas/loaders/gif/evas_image_load_gif.c
+++ b/src/modules/evas/loaders/gif/evas_image_load_gif.c
@@ -528,7 +528,11 @@ evas_image_load_file_head_gif2(void *loader_data,
528 ret = EINA_TRUE; 528 ret = EINA_TRUE;
529 529
530on_error: // jump here on any errors to clean up 530on_error: // jump here on any errors to clean up
531#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
532 if (gif) DGifCloseFile(gif, NULL);
533#else
531 if (gif) DGifCloseFile(gif); 534 if (gif) DGifCloseFile(gif);
535#endif
532 if (fi.map) eina_file_map_free(f, fi.map); 536 if (fi.map) eina_file_map_free(f, fi.map);
533 return ret; 537 return ret;
534} 538}
@@ -606,7 +610,11 @@ open_file:
606 // start as we have nothnig to build on 610 // start as we have nothnig to build on
607 if ((index > 0) && (index < loader->imgnum) && (animated->animated)) 611 if ((index > 0) && (index < loader->imgnum) && (animated->animated))
608 { 612 {
613#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
614 if (loader->gif) DGifCloseFile(loader->gif, NULL);
615#else
609 if (loader->gif) DGifCloseFile(loader->gif); 616 if (loader->gif) DGifCloseFile(loader->gif);
617#endif
610 if ((loader->fi.map) && (loader->f)) 618 if ((loader->fi.map) && (loader->f))
611 eina_file_map_free(loader->f, loader->fi.map); 619 eina_file_map_free(loader->f, loader->fi.map);
612 loader->gif = NULL; 620 loader->gif = NULL;
@@ -764,7 +772,11 @@ open_file:
764 loader->imgnum = imgnum; 772 loader->imgnum = imgnum;
765 if ((animated->frame_count <= 1) || (rec == TERMINATE_RECORD_TYPE)) 773 if ((animated->frame_count <= 1) || (rec == TERMINATE_RECORD_TYPE))
766 { 774 {
775#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
776 if (loader->gif) DGifCloseFile(loader->gif, NULL);
777#else
767 if (loader->gif) DGifCloseFile(loader->gif); 778 if (loader->gif) DGifCloseFile(loader->gif);
779#endif
768 if ((loader->fi.map) && (loader->f)) 780 if ((loader->fi.map) && (loader->f))
769 eina_file_map_free(loader->f, loader->fi.map); 781 eina_file_map_free(loader->f, loader->fi.map);
770 loader->gif = NULL; 782 loader->gif = NULL;
@@ -848,7 +860,11 @@ static void
848evas_image_load_file_close_gif2(void *loader_data) 860evas_image_load_file_close_gif2(void *loader_data)
849{ 861{
850 Loader_Info *loader = loader_data; 862 Loader_Info *loader = loader_data;
863#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
864 if (loader->gif) DGifCloseFile(loader->gif, NULL);
865#else
851 if (loader->gif) DGifCloseFile(loader->gif); 866 if (loader->gif) DGifCloseFile(loader->gif);
867#endif
852 if ((loader->fi.map) && (loader->f)) 868 if ((loader->fi.map) && (loader->f))
853 eina_file_map_free(loader->f, loader->fi.map); 869 eina_file_map_free(loader->f, loader->fi.map);
854 free(loader); 870 free(loader);