summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-12 18:42:13 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-12 18:42:13 +0900
commit8f876cfe72167554f0e50e4dd265b8ca4f799590 (patch)
treec45d5175fa19e67c1e112a3c4cb25d4f1fe24857
parent87be907144aaa5023b00e6f788d64e7ca3f1ff17 (diff)
evas - fix gif loader drop of image data sometimes (image dump/flush)
stable release - cherry-pick me! this fixses some still gifs going missing.
-rw-r--r--src/modules/evas/loaders/gif/evas_image_load_gif.c6
1 files changed, 3 insertions, 3 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 d767bd30a..e01e2760f 100644
--- a/src/modules/evas/loaders/gif/evas_image_load_gif.c
+++ b/src/modules/evas/loaders/gif/evas_image_load_gif.c
@@ -605,7 +605,7 @@ open_file:
// if we want to go backwards, we likely need/want to re-decode from the
// start as we have nothnig to build on
if ((index > 0) && (index < loader->imgnum) &&
- (loader->animated->frame_count > 1))
+ (animated->animated > 1))
{
if (loader->gif) DGifCloseFile(loader->gif);
if ((loader->fi.map) && (loader->f))
@@ -723,7 +723,7 @@ open_file:
(!animated->animated))
{
// if we don't have the data decoded yet - decode it
- if (!thisframe->loaded)
+ if ((!thisframe->loaded) || (!thisframe->data))
{
// use frame info but we WONT allocate frame pixels
finfo = thisframe->info;
@@ -781,7 +781,7 @@ on_ok:
// if it was an animated image we need to copy the data to the
// pixels for the image from the frame holding the data
if (animated->animated && frame->data)
- memcpy(pixels, frame->data, prop->w * prop->h * sizeof (DATA32));
+ memcpy(pixels, frame->data, prop->w * prop->h * sizeof(DATA32));
prop->premul = EINA_TRUE;
on_error: // jump here on any errors to clean up