diff options
author | Simon <simon@simotek.net> | 2013-06-03 09:16:25 +0100 |
---|---|---|
committer | Stefan Schmidt <s.schmidt@samsung.com> | 2013-06-03 09:16:25 +0100 |
commit | 23ed5115c01371e2f6d2556ad9b909be906e5bd2 (patch) | |
tree | 47b2cf48752f06be21ffe49aefb3301399f3c099 | |
parent | a011fc1dd94a0e5c61039e803952430c0b6b38f4 (diff) | |
download | efl-23ed5115c01371e2f6d2556ad9b909be906e5bd2.tar.gz |
evas: Fix evas gif image loader for libgif version 5
Because arc doesn't like me much at the moment here's a simple patch to
fix the gif loader for the latest libgif version. DGifOpen now takes a
error param as its final argument, if the param is not NULL it will
return a error code if it fails. Similar to another patch i sent a few
months back. The patch has been tested on OBS for old and new versions.
-rw-r--r-- | src/modules/evas/loaders/gif/evas_image_load_gif.c | 17 |
1 files changed, 16 insertions, 1 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 f3cfd9f24e..40c2aa81d4 100644 --- a/src/modules/evas/loaders/gif/evas_image_load_gif.c +++ b/src/modules/evas/loaders/gif/evas_image_load_gif.c @@ -728,7 +728,11 @@ evas_image_load_file_head_gif(void *loader_data, egi.length = eina_file_size_get(f); egi.position = 0; +#if GIFLIB_MAJOR >= 5 + gif = DGifOpen(&egi, _evas_image_load_file_read, NULL); +#else gif = DGifOpen(&egi, _evas_image_load_file_read); +#endif if (!gif) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; @@ -870,7 +874,11 @@ evas_image_load_specific_frame(Eina_File *f, egi.length = eina_file_size_get(f); egi.position = 0; +#if GIFLIB_MAJOR >= 5 + gif = DGifOpen(&egi, _evas_image_load_file_read, NULL); +#else gif = DGifOpen(&egi, _evas_image_load_file_read); +#endif if (!gif) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; @@ -970,7 +978,11 @@ evas_image_load_file_data_gif(void *loader_data, egi.length = eina_file_size_get(f); egi.position = 0; +#if GIFLIB_MAJOR >= 5 + gif = DGifOpen(&egi, _evas_image_load_file_read, NULL); +#else gif = DGifOpen(&egi, _evas_image_load_file_read); +#endif if (!gif) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; @@ -1043,8 +1055,11 @@ evas_image_load_frame_duration_gif(void *loader_data, if (!egi.map) goto on_error; egi.length = eina_file_size_get(f); egi.position = 0; - +#if GIFLIB_MAJOR >= 5 + gif = DGifOpen(&egi, _evas_image_load_file_read, NULL); +#else gif = DGifOpen(&egi, _evas_image_load_file_read); +#endif if (!gif) goto on_error; duration = 0; |