windowscodecs: Make GetFrame return WINCODEC_ERR_FRAMEMISSING without an image data.
This commit is contained in:
parent
37892c2f28
commit
a8eaeaf511
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -631,7 +631,7 @@ static HRESULT WINAPI IcoDecoder_GetFrame(IWICBitmapDecoder *iface,
|
||||
|
||||
if (!This->initialized)
|
||||
{
|
||||
hr = WINCODEC_ERR_NOTINITIALIZED;
|
||||
hr = WINCODEC_ERR_FRAMEMISSING;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user