[2/2] windowscodecs: Make GetFrame return WINCODEC_ERR_FRAMEMISSING without an image data.
Dmitry Timoshkov
dmitry at baikal.ru
Fri Nov 23 01:41:33 CST 2012
---
dlls/windowscodecs/bmpdecode.c | 2 +-
dlls/windowscodecs/gifformat.c | 2 +-
dlls/windowscodecs/icoformat.c | 2 +-
dlls/windowscodecs/jpegformat.c | 2 +-
dlls/windowscodecs/pngformat.c | 2 +-
dlls/windowscodecs/tgaformat.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/windowscodecs/bmpdecode.c b/dlls/windowscodecs/bmpdecode.c
index 99cc895..e029369 100644
--- a/dlls/windowscodecs/bmpdecode.c
+++ b/dlls/windowscodecs/bmpdecode.c
@@ -1124,7 +1124,7 @@ static HRESULT WINAPI BmpDecoder_GetFrame(IWICBitmapDecoder *iface,
if (index != 0) return E_INVALIDARG;
- if (!This->stream) return WINCODEC_ERR_WRONGSTATE;
+ if (!This->stream) return WINCODEC_ERR_FRAMEMISSING;
*ppIBitmapFrame = &This->IWICBitmapFrameDecode_iface;
IWICBitmapDecoder_AddRef(iface);
diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c
index d87a6e7..ce63af9 100644
--- a/dlls/windowscodecs/gifformat.c
+++ b/dlls/windowscodecs/gifformat.c
@@ -1271,7 +1271,7 @@ static HRESULT WINAPI GifDecoder_GetFrame(IWICBitmapDecoder *iface,
GifFrameDecode *result;
TRACE("(%p,%u,%p)\n", iface, index, ppIBitmapFrame);
- if (!This->initialized) return WINCODEC_ERR_NOTINITIALIZED;
+ if (!This->initialized) return WINCODEC_ERR_FRAMEMISSING;
if (index >= This->gif->ImageCount) return E_INVALIDARG;
diff --git a/dlls/windowscodecs/icoformat.c b/dlls/windowscodecs/icoformat.c
index d6907ea..7aec245 100644
--- a/dlls/windowscodecs/icoformat.c
+++ b/dlls/windowscodecs/icoformat.c
@@ -642,7 +642,7 @@ static HRESULT WINAPI IcoDecoder_GetFrame(IWICBitmapDecoder *iface,
if (!This->initialized)
{
- hr = WINCODEC_ERR_NOTINITIALIZED;
+ hr = WINCODEC_ERR_FRAMEMISSING;
goto fail;
}
diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c
index 82a98d8..57f1b55 100644
--- a/dlls/windowscodecs/jpegformat.c
+++ b/dlls/windowscodecs/jpegformat.c
@@ -453,7 +453,7 @@ static HRESULT WINAPI JpegDecoder_GetFrame(IWICBitmapDecoder *iface,
JpegDecoder *This = impl_from_IWICBitmapDecoder(iface);
TRACE("(%p,%u,%p)\n", iface, index, ppIBitmapFrame);
- if (!This->initialized) return WINCODEC_ERR_NOTINITIALIZED;
+ if (!This->initialized) return WINCODEC_ERR_FRAMEMISSING;
if (index != 0) return E_INVALIDARG;
diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c
index db16cbc..009532d 100644
--- a/dlls/windowscodecs/pngformat.c
+++ b/dlls/windowscodecs/pngformat.c
@@ -663,7 +663,7 @@ static HRESULT WINAPI PngDecoder_GetFrame(IWICBitmapDecoder *iface,
PngDecoder *This = impl_from_IWICBitmapDecoder(iface);
TRACE("(%p,%u,%p)\n", iface, index, ppIBitmapFrame);
- if (!This->initialized) return WINCODEC_ERR_NOTINITIALIZED;
+ if (!This->initialized) return WINCODEC_ERR_FRAMEMISSING;
if (index != 0) return E_INVALIDARG;
diff --git a/dlls/windowscodecs/tgaformat.c b/dlls/windowscodecs/tgaformat.c
index 8313f6e..bb6d969 100644
--- a/dlls/windowscodecs/tgaformat.c
+++ b/dlls/windowscodecs/tgaformat.c
@@ -427,7 +427,7 @@ static HRESULT WINAPI TgaDecoder_GetFrame(IWICBitmapDecoder *iface,
TgaDecoder *This = impl_from_IWICBitmapDecoder(iface);
TRACE("(%p,%p)\n", iface, ppIBitmapFrame);
- if (!This->initialized) return WINCODEC_ERR_NOTINITIALIZED;
+ if (!This->initialized) return WINCODEC_ERR_FRAMEMISSING;
if (index != 0) return E_INVALIDARG;
--
1.7.12.4
More information about the wine-patches
mailing list