Skip to content

Commit

Permalink
#50 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
koral-- committed Apr 10, 2014
1 parent 3c99f4d commit d13b649
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions jni/gif.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
//#define LOG_TAG "libgif"
//#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)

/**
* Decoding error - no frames
*/
#define D_GIF_ERR_NO_FRAMES 1000
#define D_GIF_ERR_INVALID_SCR_DIMS 1001
#define D_GIF_ERR_INVALID_IMG_DIMS 1002
Expand Down Expand Up @@ -586,16 +589,16 @@ static jint open(GifFileType *GifFileIn, int Error, int startPos,
D_GIF_ERR_NOT_ENOUGH_MEM, env, metaData);
return (jint) NULL;
}

if (DDGifSlurp(GifFileIn, info, false) == GIF_ERROR)
Error = GifFileIn->Error;
if (GifFileIn->SColorMap == NULL
|| GifFileIn->SColorMap->ColorCount
!= (1 << GifFileIn->SColorMap->BitsPerPixel))
{
GifFreeMapObject(GifFileIn->SColorMap);
GifFileIn->SColorMap = defaultCmap;
}
if (DDGifSlurp(GifFileIn, info, false) == GIF_ERROR)
Error = GifFileIn->Error;

int imgCount = GifFileIn->ImageCount;
//TODO add leniency support
if (imgCount < 1)
Expand Down
Binary file modified libs/armeabi-v7a/libgif.so
Binary file not shown.
Binary file modified libs/armeabi/libgif.so
Binary file not shown.
Binary file modified libs/mips/libgif.so
Binary file not shown.
Binary file modified libs/x86/libgif.so
Binary file not shown.

0 comments on commit d13b649

Please sign in to comment.