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
37892c2f
Commit
37892c2f
authored
Nov 23, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Add a test to show that QueryCapability initializes the decoder.
parent
55542922
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
tiffformat.c
dlls/windowscodecs/tests/tiffformat.c
+12
-0
tiffformat.c
dlls/windowscodecs/tiffformat.c
+1
-1
No files found.
dlls/windowscodecs/tests/tiffformat.c
View file @
37892c2f
...
...
@@ -185,6 +185,7 @@ static void test_QueryCapability(void)
HRESULT
hr
;
IStream
*
stream
;
IWICBitmapDecoder
*
decoder
;
IWICBitmapFrameDecode
*
frame
;
static
const
DWORD
exp_caps
=
WICBitmapDecoderCapabilityCanDecodeAllImages
|
WICBitmapDecoderCapabilityCanDecodeSomeImages
|
WICBitmapDecoderCapabilityCanEnumerateMetadata
;
...
...
@@ -206,6 +207,9 @@ static void test_QueryCapability(void)
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_POINTER
)
/* XP */
,
"GetFrameCount error %#x
\n
"
,
hr
);
ok
(
frame_count
==
0
,
"expected 0, got %u
\n
"
,
frame_count
);
hr
=
IWICBitmapDecoder_GetFrame
(
decoder
,
0
,
&
frame
);
ok
(
hr
==
WINCODEC_ERR_FRAMEMISSING
||
broken
(
hr
==
E_POINTER
)
/* XP */
,
"expected WINCODEC_ERR_FRAMEMISSING, got %#x
\n
"
,
hr
);
pos
.
QuadPart
=
4
;
hr
=
IStream_Seek
(
stream
,
pos
,
SEEK_SET
,
NULL
);
ok
(
hr
==
S_OK
,
"IStream_Seek error %#x
\n
"
,
hr
);
...
...
@@ -221,6 +225,10 @@ static void test_QueryCapability(void)
ok
(
hr
==
S_OK
,
"GetFrameCount error %#x
\n
"
,
hr
);
ok
(
frame_count
==
1
,
"expected 1, got %u
\n
"
,
frame_count
);
hr
=
IWICBitmapDecoder_GetFrame
(
decoder
,
0
,
&
frame
);
ok
(
hr
==
S_OK
,
"GetFrame error %#x
\n
"
,
hr
);
IWICBitmapFrameDecode_Release
(
frame
);
pos
.
QuadPart
=
0
;
hr
=
IStream_Seek
(
stream
,
pos
,
SEEK_CUR
,
&
cur_pos
);
ok
(
hr
==
S_OK
,
"IStream_Seek error %#x
\n
"
,
hr
);
...
...
@@ -251,6 +259,10 @@ todo_wine
ok
(
hr
==
S_OK
,
"GetFrameCount error %#x
\n
"
,
hr
);
ok
(
frame_count
==
1
,
"expected 1, got %u
\n
"
,
frame_count
);
hr
=
IWICBitmapDecoder_GetFrame
(
decoder
,
0
,
&
frame
);
ok
(
hr
==
S_OK
,
"GetFrame error %#x
\n
"
,
hr
);
IWICBitmapFrameDecode_Release
(
frame
);
hr
=
IWICBitmapDecoder_Initialize
(
decoder
,
stream
,
WICDecodeMetadataCacheOnDemand
);
ok
(
hr
==
WINCODEC_ERR_WRONGSTATE
,
"expected WINCODEC_ERR_WRONGSTATE, got %#x
\n
"
,
hr
);
...
...
dlls/windowscodecs/tiffformat.c
View file @
37892c2f
...
...
@@ -702,7 +702,7 @@ static HRESULT WINAPI TiffDecoder_GetFrame(IWICBitmapDecoder *iface,
TRACE
(
"(%p,%u,%p)
\n
"
,
iface
,
index
,
ppIBitmapFrame
);
if
(
!
This
->
tiff
)
return
WINCODEC_ERR_
WRONGSTATE
;
return
WINCODEC_ERR_
FRAMEMISSING
;
EnterCriticalSection
(
&
This
->
lock
);
res
=
pTIFFSetDirectory
(
This
->
tiff
,
index
);
...
...
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