libextractor

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

commit 857d1c789ea746fa4d4aab2cb964277ce025a232
parent 745e5826bb00eff3642ed42701d6c31c93647384
Author: LRN <lrn1986@gmail.com>
Date:   Thu, 31 Jul 2014 14:58:51 +0000

Add giflib-5.1.0 compatibility

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

diff --git a/src/plugins/gif_extractor.c b/src/plugins/gif_extractor.c @@ -78,7 +78,11 @@ EXTRACTOR_gif_extract_method (struct EXTRACTOR_ExtractContext *ec) if (gif_file == NULL || gif_error != 0) { if (gif_file != NULL) +#if GIFLIB_MAJOR < 5 || GIFLIB_MINOR < 1 EGifCloseFile (gif_file); +#else + EGifCloseFile (gif_file, NULL); +#endif return; /* not a GIF */ } #endif @@ -133,7 +137,11 @@ EXTRACTOR_gif_extract_method (struct EXTRACTOR_ExtractContext *ec) DGifGetExtensionNext(gif_file, &ext)) && (NULL != ext) ) ; /* keep going */ } +#if defined (GIF_LIB_VERSION) || GIFLIB_MAJOR < 5 || GIFLIB_MINOR < 1 DGifCloseFile (gif_file); +#else + DGifCloseFile (gif_file, NULL); +#endif } /* end of gif_extractor.c */