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.
This commit is contained in:
Simon 2013-06-03 09:16:25 +01:00 committed by Stefan Schmidt
parent a011fc1dd9
commit 23ed5115c0
1 changed files with 16 additions and 1 deletions

View File

@ -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;