windowscodecs: Reimplement GetFrameCount of the GIF decoder.

oldstable
Dmitry Timoshkov 2012-11-22 18:26:28 +08:00 committed by Alexandre Julliard
parent 47513d9551
commit 892c16e661
1 changed files with 5 additions and 4 deletions

View File

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