stefan pushed a commit to branch master.
commit 23ed5115c01371e2f6d2556ad9b909be906e5bd2
Author: Simon <[email protected]>
Date: Mon Jun 3 09:16:25 2013 +0100
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.
---
src/modules/evas/loaders/gif/evas_image_load_gif.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
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 f3cfd9f..40c2aa8 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;
--
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j