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
531992c7
Commit
531992c7
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 png decoder.
parent
b6811233
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
pngformat.c
dlls/windowscodecs/pngformat.c
+5
-0
pngformat.c
dlls/windowscodecs/tests/pngformat.c
+3
-1
No files found.
dlls/windowscodecs/pngformat.c
View file @
531992c7
...
...
@@ -296,6 +296,7 @@ typedef struct {
IWICBitmapFrameDecode
IWICBitmapFrameDecode_iface
;
IWICMetadataBlockReader
IWICMetadataBlockReader_iface
;
LONG
ref
;
IStream
*
stream
;
png_structp
png_ptr
;
png_infop
info_ptr
;
png_infop
end_info
;
...
...
@@ -366,6 +367,7 @@ static ULONG WINAPI PngDecoder_Release(IWICBitmapDecoder *iface)
if
(
ref
==
0
)
{
IStream_Release
(
This
->
stream
);
if
(
This
->
png_ptr
)
ppng_destroy_read_struct
(
&
This
->
png_ptr
,
&
This
->
info_ptr
,
&
This
->
end_info
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
0
;
...
...
@@ -605,6 +607,9 @@ static HRESULT WINAPI PngDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p
ppng_read_end
(
This
->
png_ptr
,
This
->
end_info
);
This
->
stream
=
pIStream
;
IStream_AddRef
(
This
->
stream
);
This
->
initialized
=
TRUE
;
end:
...
...
dlls/windowscodecs/tests/pngformat.c
View file @
531992c7
...
...
@@ -283,6 +283,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
);
...
...
@@ -300,7 +301,8 @@ static IWICBitmapDecoder *create_decoder(const void *image_data, UINT image_size
ok
(
IsEqualGUID
(
&
format
,
&
GUID_ContainerFormatPng
),
"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