src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c

Print this page

        

*** 294,312 **** } free(pBitmapBits); free(pOldBitmapBits); ! DGifCloseFile(gif, NULL); return 1; } int SplashDecodeGifStream(Splash * splash, SplashStream * stream) { GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc, NULL); if (!gif) return 0; return SplashDecodeGif(splash, gif); } --- 294,321 ---- } free(pBitmapBits); free(pOldBitmapBits); ! #if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) ! if (DGifCloseFile(gif, NULL) == GIF_ERROR) ! return 0; ! #else ! DGifCloseFile(gif); ! #endif return 1; } int SplashDecodeGifStream(Splash * splash, SplashStream * stream) { + #if GIFLIB_MAJOR >= 5 GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc, NULL); + #else + GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc); + #endif if (!gif) return 0; return SplashDecodeGif(splash, gif); }