summaryrefslogtreecommitdiff
path: root/src/gif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gif.c')
-rw-r--r--src/gif.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gif.c b/src/gif.c
index 6ea23561..57506590 100644
--- a/src/gif.c
+++ b/src/gif.c
@@ -176,16 +176,16 @@ void *a_Gif_image(const char *Type, void *Ptr, CA_Callback_t *Call,
if (!DicEntry) {
/* Let's create an entry for this image... */
DicEntry = a_Dicache_add_entry(web->url);
-
- /* ... and let the decoder feed it! */
- *Data = Gif_new(web->Image, DicEntry->url, DicEntry->version);
- *Call = (CA_Callback_t) Gif_callback;
+ DicEntry->DecoderData =
+ Gif_new(web->Image, DicEntry->url, DicEntry->version);
} else {
- /* Let's feed our client from the dicache */
+ /* Repeated image */
a_Dicache_ref(DicEntry->url, DicEntry->version);
- *Data = web->Image;
- *Call = (CA_Callback_t) a_Dicache_callback;
}
+ DicEntry->Decoder = Gif_callback;
+ *Data = DicEntry->DecoderData;
+ *Call = (CA_Callback_t) a_Dicache_callback;
+
return (web->Image->dw);
}