Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
b6811233
Commit
b6811233
authored
Mar 12, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Store stream reference in gif decoder.
parent
a1819978
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
gifformat.c
dlls/windowscodecs/gifformat.c
+5
-0
gifformat.c
dlls/windowscodecs/tests/gifformat.c
+3
-1
No files found.
dlls/windowscodecs/gifformat.c
View file @
b6811233
...
...
@@ -578,6 +578,7 @@ static HRESULT create_metadata_reader(const void *data, int data_size,
typedef
struct
{
IWICBitmapDecoder
IWICBitmapDecoder_iface
;
IWICMetadataBlockReader
IWICMetadataBlockReader_iface
;
IStream
*
stream
;
BYTE
LSD_data
[
13
];
/* Logical Screen Descriptor */
LONG
ref
;
BOOL
initialized
;
...
...
@@ -1054,6 +1055,7 @@ static ULONG WINAPI GifDecoder_Release(IWICBitmapDecoder *iface)
if
(
ref
==
0
)
{
IStream_Release
(
This
->
stream
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
lock
);
DGifCloseFile
(
This
->
gif
);
...
...
@@ -1141,6 +1143,9 @@ static HRESULT WINAPI GifDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p
IStream_Seek
(
pIStream
,
seek
,
STREAM_SEEK_SET
,
NULL
);
IStream_Read
(
pIStream
,
This
->
LSD_data
,
sizeof
(
This
->
LSD_data
),
NULL
);
This
->
stream
=
pIStream
;
IStream_AddRef
(
This
->
stream
);
This
->
initialized
=
TRUE
;
LeaveCriticalSection
(
&
This
->
lock
);
...
...
dlls/windowscodecs/tests/gifformat.c
View file @
b6811233
...
...
@@ -67,6 +67,7 @@ static IWICBitmapDecoder *create_decoder(const void *image_data, UINT image_size
IWICBitmapDecoder
*
decoder
=
NULL
;
IStream
*
stream
;
GUID
format
;
LONG
refcount
;
hmem
=
GlobalAlloc
(
0
,
image_size
);
data
=
GlobalLock
(
hmem
);
...
...
@@ -84,7 +85,8 @@ static IWICBitmapDecoder *create_decoder(const void *image_data, UINT image_size
ok
(
IsEqualGUID
(
&
format
,
&
GUID_ContainerFormatGif
),
"wrong container format %s
\n
"
,
wine_dbgstr_guid
(
&
format
));
IStream_Release
(
stream
);
refcount
=
IStream_Release
(
stream
);
ok
(
refcount
>
0
,
"expected stream refcount > 0
\n
"
);
return
decoder
;
}
...
...
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