Commit 863f432a authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

windowscodecs: Distinguish interface and implementation pointer for IcnsEncoder.

parent d37f4076
......@@ -179,7 +179,7 @@ static ULONG WINAPI IcnsFrameEncode_Release(IWICBitmapFrameEncode *iface)
if (This->icns_image != NULL)
HeapFree(GetProcessHeap(), 0, This->icns_image);
IUnknown_Release((IUnknown*)This->encoder);
IWICBitmapFrameEncode_Release(&This->encoder->IWICBitmapFrameEncode_iface);
HeapFree(GetProcessHeap(), 0, This);
}
......@@ -489,7 +489,7 @@ static HRESULT WINAPI IcnsEncoder_QueryInterface(IWICBitmapEncoder *iface, REFII
if (IsEqualIID(&IID_IUnknown, iid) ||
IsEqualIID(&IID_IWICBitmapEncoder, iid))
{
*ppv = This;
*ppv = &This->IWICBitmapEncoder_iface;
}
else
{
......@@ -639,7 +639,7 @@ static HRESULT WINAPI IcnsEncoder_CreateNewFrame(IWICBitmapEncoder *iface,
frameEncode->committed = FALSE;
*ppIFrameEncode = &frameEncode->IWICBitmapFrameEncode_iface;
This->outstanding_commits++;
IUnknown_AddRef((IUnknown*)This);
IWICBitmapEncoder_AddRef(&This->IWICBitmapEncoder_iface);
end:
LeaveCriticalSection(&This->lock);
......@@ -725,8 +725,8 @@ HRESULT IcnsEncoder_CreateInstance(REFIID iid, void** ppv)
InitializeCriticalSection(&This->lock);
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IcnsEncoder.lock");
ret = IUnknown_QueryInterface((IUnknown*)This, iid, ppv);
IUnknown_Release((IUnknown*)This);
ret = IWICBitmapEncoder_QueryInterface(&This->IWICBitmapEncoder_iface, iid, ppv);
IWICBitmapEncoder_Release(&This->IWICBitmapEncoder_iface);
return ret;
}
......
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