windowscodecs: Make GetFrame return WINCODEC_ERR_FRAMEMISSING without an image data.

This commit is contained in:
Dmitry Timoshkov 2012-11-23 15:41:33 +08:00 committed by Alexandre Julliard
parent 37892c2f28
commit a8eaeaf511
6 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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;

View File

@ -631,7 +631,7 @@ static HRESULT WINAPI IcoDecoder_GetFrame(IWICBitmapDecoder *iface,
if (!This->initialized)
{
hr = WINCODEC_ERR_NOTINITIALIZED;
hr = WINCODEC_ERR_FRAMEMISSING;
goto fail;
}

View File

@ -440,7 +440,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;

View File

@ -650,7 +650,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;

View File

@ -415,7 +415,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;