Vincent Povirk : windowscodecs: Fix tiffformat test on current Windows 10.
Alexandre Julliard
julliard at winehq.org
Thu Nov 21 16:33:27 CST 2019
Module: wine
Branch: master
Commit: 546ab20cf350321aefe1b4ebee193d055c842f12
URL: https://source.winehq.org/git/wine.git/?a=commit;h=546ab20cf350321aefe1b4ebee193d055c842f12
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Wed Nov 20 11:28:55 2019 -0600
windowscodecs: Fix tiffformat test on current Windows 10.
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/windowscodecs/tests/tiffformat.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/windowscodecs/tests/tiffformat.c b/dlls/windowscodecs/tests/tiffformat.c
index 2f9a0ca65f..861e620e44 100644
--- a/dlls/windowscodecs/tests/tiffformat.c
+++ b/dlls/windowscodecs/tests/tiffformat.c
@@ -405,7 +405,6 @@ static void test_QueryCapability(void)
WICBitmapDecoderCapabilityCanDecodeSomeImages;
DWORD capability;
LARGE_INTEGER pos;
- ULARGE_INTEGER cur_pos;
UINT frame_count;
stream = create_stream(&tiff_1bpp_data, sizeof(tiff_1bpp_data));
@@ -442,11 +441,9 @@ static void test_QueryCapability(void)
ok(hr == S_OK, "GetFrame error %#x\n", hr);
IWICBitmapFrameDecode_Release(frame);
- pos.QuadPart = 0;
- hr = IStream_Seek(stream, pos, SEEK_CUR, &cur_pos);
+ pos.QuadPart = 5;
+ hr = IStream_Seek(stream, pos, SEEK_SET, NULL);
ok(hr == S_OK, "IStream_Seek error %#x\n", hr);
- ok(cur_pos.QuadPart > 4 && cur_pos.QuadPart < sizeof(tiff_1bpp_data),
- "current stream pos is at %x/%x\n", cur_pos.u.LowPart, cur_pos.u.HighPart);
hr = IWICBitmapDecoder_QueryCapability(decoder, stream, &capability);
ok(hr == WINCODEC_ERR_WRONGSTATE, "expected WINCODEC_ERR_WRONGSTATE, got %#x\n", hr);
@@ -456,6 +453,7 @@ static void test_QueryCapability(void)
IWICBitmapDecoder_Release(decoder);
+ /* CreateDecoderFromStream fails if seeked past the start */
hr = IWICImagingFactory_CreateDecoderFromStream(factory, stream, NULL, 0, &decoder);
todo_wine
ok(hr == WINCODEC_ERR_COMPONENTNOTFOUND, "expected WINCODEC_ERR_COMPONENTNOTFOUND, got %#x\n", hr);
More information about the wine-cvs
mailing list