libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit b5f1a8ce72bd90ecb307d26c7d962819152f1d02
parent f43b3411a05e6e3d3ee61ef7dcb4f80bae05b5dd
Author: LRN <lrn1986@gmail.com>
Date:   Sun,  5 Aug 2012 11:12:52 +0000

Giflib >= 5.0 compatibility

Diffstat:
Msrc/plugins/gif_extractor.c | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/plugins/gif_extractor.c b/src/plugins/gif_extractor.c @@ -63,9 +63,22 @@ EXTRACTOR_gif_extract_method (struct EXTRACTOR_ExtractContext *ec) GifByteType *ext; int et; char dims[128]; +/* GIFLIB >= 5.0 does not define GIF_LIB_VERSION anymore */ +#if !defined (GIF_LIB_VERSION) + int gif_error; + gif_error = 0; + gif_file = DGifOpen (ec, &gif_read_func, &gif_error); + if (gif_file == NULL || gif_error != 0) + { + if (gif_file != NULL) + EGifCloseFile (gif_file); + return; /* not a GIF */ + } +#else if (NULL == (gif_file = DGifOpen (ec, &gif_read_func))) return; /* not a GIF */ +#endif if (0 != ec->proc (ec->cls, "gif",