Module: wine Branch: master Commit: 5fd834fc956f9b54bbe653b651747f8c28809478 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5fd834fc956f9b54bbe653b651...
Author: Vincent Povirk vincent@codeweavers.com Date: Tue Jan 4 14:01:45 2011 -0600
windowscodecs: Store an impl pointer instead of an iface pointer.
---
dlls/windowscodecs/bmpencode.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/windowscodecs/bmpencode.c b/dlls/windowscodecs/bmpencode.c index b79a19b..4b3b9ea 100644 --- a/dlls/windowscodecs/bmpencode.c +++ b/dlls/windowscodecs/bmpencode.c @@ -410,7 +410,7 @@ typedef struct BmpEncoder { const IWICBitmapEncoderVtbl *lpVtbl; LONG ref; IStream *stream; - IWICBitmapFrameEncode *frame; + BmpFrameEncode *frame; } BmpEncoder;
static HRESULT WINAPI BmpEncoder_QueryInterface(IWICBitmapEncoder *iface, REFIID iid, @@ -456,7 +456,7 @@ static ULONG WINAPI BmpEncoder_Release(IWICBitmapEncoder *iface) if (ref == 0) { if (This->stream) IStream_Release(This->stream); - if (This->frame) IWICBitmapFrameEncode_Release(This->frame); + if (This->frame) IWICBitmapFrameEncode_Release((IWICBitmapFrameEncode*)This->frame); HeapFree(GetProcessHeap(), 0, This); }
@@ -553,7 +553,7 @@ static HRESULT WINAPI BmpEncoder_CreateNewFrame(IWICBitmapEncoder *iface, encode->committed = FALSE;
*ppIFrameEncode = (IWICBitmapFrameEncode*)encode; - This->frame = (IWICBitmapFrameEncode*)encode; + This->frame = encode;
return S_OK; } @@ -561,10 +561,9 @@ static HRESULT WINAPI BmpEncoder_CreateNewFrame(IWICBitmapEncoder *iface, static HRESULT WINAPI BmpEncoder_Commit(IWICBitmapEncoder *iface) { BmpEncoder *This = (BmpEncoder*)iface; - BmpFrameEncode *frame = (BmpFrameEncode*)This->frame; TRACE("(%p)\n", iface);
- if (!frame || !frame->committed) return WINCODEC_ERR_WRONGSTATE; + if (!This->frame || !This->frame->committed) return WINCODEC_ERR_WRONGSTATE;
return S_OK; }