Commit 892c16e6 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

windowscodecs: Reimplement GetFrameCount of the GIF decoder.

parent 47513d95
......@@ -1241,13 +1241,14 @@ static HRESULT WINAPI GifDecoder_GetFrameCount(IWICBitmapDecoder *iface,
UINT *pCount)
{
GifDecoder *This = impl_from_IWICBitmapDecoder(iface);
TRACE("(%p,%p)\n", iface, pCount);
if (!This->initialized) return WINCODEC_ERR_NOTINITIALIZED;
if (!pCount) return E_INVALIDARG;
*pCount = This->gif->ImageCount;
EnterCriticalSection(&This->lock);
*pCount = This->gif ? This->gif->ImageCount : 0;
LeaveCriticalSection(&This->lock);
TRACE("<- %u\n", *pCount);
TRACE("(%p) <-- %d\n", iface, *pCount);
return S_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment