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:43:49 +0200
commit5e07d8820d8f5620a42f75b3f9e1c30fad58c9c5 (patch)
tree356a4d0aec3bede1888c2ba8271d4efed37bf4f9
parent44b1db807b758d4fe45d93099dbe374b920d0fec (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 e01e2760f4..99bd0bdd5e 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}
@@ -607,7 +611,11 @@ open_file:
607 if ((index > 0) && (index < loader->imgnum) && 611 if ((index > 0) && (index < loader->imgnum) &&
608 (animated->animated > 1)) 612 (animated->animated > 1))
609 { 613 {
614#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
615 if (loader->gif) DGifCloseFile(loader->gif, NULL);
616#else
610 if (loader->gif) DGifCloseFile(loader->gif); 617 if (loader->gif) DGifCloseFile(loader->gif);
618#endif
611 if ((loader->fi.map) && (loader->f)) 619 if ((loader->fi.map) && (loader->f))
612 eina_file_map_free(loader->f, loader->fi.map); 620 eina_file_map_free(loader->f, loader->fi.map);
613 loader->gif = NULL; 621 loader->gif = NULL;
@@ -765,7 +773,11 @@ open_file:
765 loader->imgnum = imgnum; 773 loader->imgnum = imgnum;
766 if ((animated->frame_count <= 1) || (rec == TERMINATE_RECORD_TYPE)) 774 if ((animated->frame_count <= 1) || (rec == TERMINATE_RECORD_TYPE))
767 { 775 {
776#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
777 if (loader->gif) DGifCloseFile(loader->gif, NULL);
778#else
768 if (loader->gif) DGifCloseFile(loader->gif); 779 if (loader->gif) DGifCloseFile(loader->gif);
780#endif
769 if ((loader->fi.map) && (loader->f)) 781 if ((loader->fi.map) && (loader->f))
770 eina_file_map_free(loader->f, loader->fi.map); 782 eina_file_map_free(loader->f, loader->fi.map);
771 loader->gif = NULL; 783 loader->gif = NULL;
@@ -849,7 +861,11 @@ static void
849evas_image_load_file_close_gif2(void *loader_data) 861evas_image_load_file_close_gif2(void *loader_data)
850{ 862{
851 Loader_Info *loader = loader_data; 863 Loader_Info *loader = loader_data;
864#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
865 if (loader->gif) DGifCloseFile(loader->gif, NULL);
866#else
852 if (loader->gif) DGifCloseFile(loader->gif); 867 if (loader->gif) DGifCloseFile(loader->gif);
868#endif
853 if ((loader->fi.map) && (loader->f)) 869 if ((loader->fi.map) && (loader->f))
854 eina_file_map_free(loader->f, loader->fi.map); 870 eina_file_map_free(loader->f, loader->fi.map);
855 free(loader); 871 free(loader);