Module: wine Branch: master Commit: ad1d8adfeb57c8fd59b6088ad3880a4ad7b18995 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ad1d8adfeb57c8fd59b6088ad3...
Author: Vincent Povirk vincent@codeweavers.com Date: Fri Aug 14 16:13:15 2009 -0500
windowscodecs: Add a WARN message when CreateDecoderFromStream fails.
---
dlls/windowscodecs/imgfactory.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/dlls/windowscodecs/imgfactory.c b/dlls/windowscodecs/imgfactory.c index ab85bca..6424e42 100644 --- a/dlls/windowscodecs/imgfactory.c +++ b/dlls/windowscodecs/imgfactory.c @@ -164,6 +164,21 @@ static HRESULT WINAPI ImagingFactory_CreateDecoderFromStream( } else { + if (WARN_ON(wincodecs)) + { + LARGE_INTEGER seek; + BYTE data[4]; + ULONG bytesread; + + WARN("failed to load from a stream\n"); + + seek.QuadPart = 0; + res = IStream_Seek(pIStream, seek, STREAM_SEEK_SET, NULL); + if (SUCCEEDED(res)) + res = IStream_Read(pIStream, data, 4, &bytesread); + if (SUCCEEDED(res)) + WARN("first %i bytes of stream=%x %x %x %x\n", bytesread, data[0], data[1], data[2], data[3]); + } *ppIDecoder = NULL; return WINCODEC_ERR_COMPONENTNOTFOUND; }