From 80b12b7b8fce6a80abd5dc6a2aceb254c1513d96 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Wed, 20 Oct 2010 12:54:08 -0500 Subject: [PATCH] windowscodecs: Seek to start of stream when opening TIFF files. --- dlls/windowscodecs/tiffformat.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c index 645cfb0..2525ee0 100644 --- a/dlls/windowscodecs/tiffformat.c +++ b/dlls/windowscodecs/tiffformat.c @@ -183,6 +183,11 @@ static void tiff_stream_unmap(thandle_t client_data, tdata_t addr, toff_t size) static TIFF* tiff_open_stream(IStream *stream, const char *mode) { + LARGE_INTEGER zero; + + zero.QuadPart = 0; + IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); + return pTIFFClientOpen("", mode, stream, tiff_stream_read, tiff_stream_write, tiff_stream_seek, tiff_stream_close, tiff_stream_size, tiff_stream_map, tiff_stream_unmap); -- 1.7.1