libextractor

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

commit be7643de15f17c1ac3a8fd858ac29bcbae16435f
parent 6423e75538bbd5225363ccf8304ca34945e29b9a
Author: David Barksdale <amatus@amat.us>
Date:   Tue, 18 Jun 2013 13:49:59 +0000

Support giflib version 4.2.x



Diffstat:
Msrc/plugins/gif_extractor.c | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/plugins/gif_extractor.c b/src/plugins/gif_extractor.c @@ -67,8 +67,10 @@ 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) +#if defined (GIF_LIB_VERSION) || GIFLIB_MAJOR <= 4 + if (NULL == (gif_file = DGifOpen (ec, &gif_read_func))) + return; /* not a GIF */ +#else int gif_error; gif_error = 0; @@ -79,9 +81,6 @@ EXTRACTOR_gif_extract_method (struct EXTRACTOR_ExtractContext *ec) 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,