Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
d1fde625
Commit
d1fde625
authored
Jul 13, 2015
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 14, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Don't fail to decode GIF if an image has been already loaded.
parent
51a3bc2d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
gifformat.c
dlls/windowscodecs/tests/gifformat.c
+0
-9
ungif.c
dlls/windowscodecs/ungif.c
+7
-2
No files found.
dlls/windowscodecs/tests/gifformat.c
View file @
d1fde625
...
...
@@ -459,43 +459,34 @@ static void test_truncated_gif(void)
stream
=
create_stream
(
gif_with_trailer_2
,
sizeof
(
gif_with_trailer_2
));
if
(
!
stream
)
return
;
hr
=
IWICImagingFactory_CreateDecoderFromStream
(
factory
,
stream
,
NULL
,
0
,
&
decoder
);
todo_wine
ok
(
hr
==
S_OK
,
"CreateDecoderFromStream error %#x
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
goto
skip_1
;
hr
=
IWICBitmapDecoder_GetContainerFormat
(
decoder
,
&
format
);
ok
(
hr
==
S_OK
,
"GetContainerFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_ContainerFormatGif
),
"wrong container format %s
\n
"
,
wine_dbgstr_guid
(
&
format
));
IWICBitmapDecoder_Release
(
decoder
);
skip_1:
IStream_Release
(
stream
);
stream
=
create_stream
(
gif_without_trailer_1
,
sizeof
(
gif_without_trailer_1
));
if
(
!
stream
)
return
;
hr
=
IWICImagingFactory_CreateDecoderFromStream
(
factory
,
stream
,
NULL
,
0
,
&
decoder
);
todo_wine
ok
(
hr
==
S_OK
,
"CreateDecoderFromStream error %#x
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
goto
skip_2
;
hr
=
IWICBitmapDecoder_GetContainerFormat
(
decoder
,
&
format
);
ok
(
hr
==
S_OK
,
"GetContainerFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_ContainerFormatGif
),
"wrong container format %s
\n
"
,
wine_dbgstr_guid
(
&
format
));
IWICBitmapDecoder_Release
(
decoder
);
skip_2:
IStream_Release
(
stream
);
stream
=
create_stream
(
gif_without_trailer_2
,
sizeof
(
gif_without_trailer_2
));
if
(
!
stream
)
return
;
hr
=
IWICImagingFactory_CreateDecoderFromStream
(
factory
,
stream
,
NULL
,
0
,
&
decoder
);
todo_wine
ok
(
hr
==
S_OK
,
"CreateDecoderFromStream error %#x
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
goto
skip_3
;
hr
=
IWICBitmapDecoder_GetContainerFormat
(
decoder
,
&
format
);
ok
(
hr
==
S_OK
,
"GetContainerFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_ContainerFormatGif
),
"wrong container format %s
\n
"
,
wine_dbgstr_guid
(
&
format
));
IWICBitmapDecoder_Release
(
decoder
);
skip_3:
IStream_Release
(
stream
);
}
...
...
dlls/windowscodecs/ungif.c
View file @
d1fde625
...
...
@@ -53,8 +53,10 @@
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "ungif.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wincodecs
);
static
void
*
ungif_alloc
(
size_t
sz
)
{
...
...
@@ -491,7 +493,10 @@ DGifGetLine(GifFileType * GifFile,
* image until empty block (size 0) detected. We use GetCodeNext. */
do
if
(
DGifGetCodeNext
(
GifFile
,
&
Dummy
)
==
GIF_ERROR
)
return
GIF_ERROR
;
{
WARN
(
"GIF is not properly terminated
\n
"
);
break
;
}
while
(
Dummy
!=
NULL
)
;
}
return
GIF_OK
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment