From fecf68a886796dfca9e063d59e195da35bc7213d Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Tue, 22 Jan 2013 19:00:08 +0000 Subject: [PATCH] efl: Unbreak evas gif-loader animation support Always returning -1 for the frame duration does not have the desired effect. Fix the logic checking whether eina_file_open has succeeded. Animated GIFs play way too fast without this. Signed-off-by: Daniel Willmann SVN revision: 83100 --- ChangeLog | 4 ++++ NEWS | 1 + src/modules/evas/loaders/gif/evas_image_load_gif.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 10da6bb..8b21c8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -357,3 +357,7 @@ 2013-01-15 ChunEon Park (Hermet) * Fix SIGFPE in evas map update if image size is 0. + +2013-01-22 Daniel Willmann + + * Fix evas gif loader to return the correct frame duration diff --git a/NEWS b/NEWS index e81a27e..cd71349 100644 --- a/NEWS +++ b/NEWS @@ -124,3 +124,4 @@ Fixes: * Evas text utils: Fixed issue with no-harfbuzz bidi. * Fixed pixman surface alloc where allocated and image size differ. * Fixed x11 error sync issue with ecore_x_image_get() + * Fix evas gif loader to return the correct frame duration 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 93d56fb..b39bd90 100644 --- a/src/modules/evas/loaders/gif/evas_image_load_gif.c +++ b/src/modules/evas/loaders/gif/evas_image_load_gif.c @@ -1024,7 +1024,7 @@ evas_image_load_frame_duration_gif(Image_Entry *ie, const char *file, const int if (frame_num < 0) return -1; f = eina_file_open(file, EINA_FALSE); - if (f) return -1; + if (!f) return -1; egi.map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); if (!egi.map) goto on_error; -- 2.7.4