Module: wine Branch: master Commit: 892c16e6611fa70c28558c93ac3228617fb1fa15 URL: http://source.winehq.org/git/wine.git/?a=commit;h=892c16e6611fa70c28558c93ac...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Thu Nov 22 18:26:28 2012 +0800
windowscodecs: Reimplement GetFrameCount of the GIF decoder.
---
dlls/windowscodecs/gifformat.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 4fa10e0..eb8a37b 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -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; }