Dmitry Timoshkov : windowscodecs: GIF Graphic Control Extension block belongs to the image which follows it.
Alexandre Julliard
julliard at winehq.org
Tue Sep 18 14:04:29 CDT 2012
Module: wine
Branch: master
Commit: 880b98bf23f3031f4a0b6c2a1fd5f96e672e1927
URL: http://source.winehq.org/git/wine.git/?a=commit;h=880b98bf23f3031f4a0b6c2a1fd5f96e672e1927
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Tue Sep 18 12:58:25 2012 +0900
windowscodecs: GIF Graphic Control Extension block belongs to the image which follows it.
---
dlls/windowscodecs/ungif.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/windowscodecs/ungif.c b/dlls/windowscodecs/ungif.c
index 66310cb..7984e3a 100644
--- a/dlls/windowscodecs/ungif.c
+++ b/dlls/windowscodecs/ungif.c
@@ -885,16 +885,19 @@ DGifSlurp(GifFileType * GifFile) {
case EXTENSION_RECORD_TYPE:
{
+ int Function;
Extensions *Extensions;
- if (GifFile->ImageCount)
+ if (DGifGetExtension(GifFile, &Function, &ExtData) == GIF_ERROR)
+ return (GIF_ERROR);
+
+ if (GifFile->ImageCount || Function == GRAPHICS_EXT_FUNC_CODE)
Extensions = &temp_save;
else
Extensions = &GifFile->Extensions;
- if (DGifGetExtension(GifFile, &Extensions->Function, &ExtData) ==
- GIF_ERROR)
- return (GIF_ERROR);
+ Extensions->Function = Function;
+
while (ExtData != NULL) {
/* Create an extension block with our data */
More information about the wine-cvs
mailing list