gif2webp: Backward compatibility for giflib version <= 4.1.3

Fixes https://code.google.com/p/webp/issues/detail?id=172

We use 'int' instead of 'GifWord', which was introduced in version
4.1.4.

Tested OK on 4.1.3
(http://sourceforge.net/projects/giflib/files/giflib-4.x/giflib%204.1.3/)
and 5.0.4

Change-Id: I77628b0f9175a91eb3a22e64fc55dd00633add1f
This commit is contained in:
Urvang Joshi 2013-12-11 08:46:38 -08:00
parent 4c617d3286
commit d49345533f

View File

@ -154,7 +154,7 @@ static int ReadFrame(GifFileType* const gif, WebPFrameRect* const gif_rect,
}
static int GetBackgroundColor(const ColorMapObject* const color_map,
GifWord bgcolor_idx, uint32_t* const bgcolor) {
int bgcolor_idx, uint32_t* const bgcolor) {
if (transparent_index != -1 && bgcolor_idx == transparent_index) {
*bgcolor = WEBP_UTIL_TRANSPARENT_COLOR; // Special case.
return 1;