From d13dde18fa19a38bb4e66673d5c9d05cbd3e9492 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Thu, 14 Jul 2016 10:26:16 +0200 Subject: [PATCH] avifil32: Avoid casts from COM objects to ifaces. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- dlls/avifil32/editstream.c | 4 ++-- dlls/avifil32/tmpfile.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/avifil32/editstream.c b/dlls/avifil32/editstream.c index 815283b4883..2e0fa2fd60f 100644 --- a/dlls/avifil32/editstream.c +++ b/dlls/avifil32/editstream.c @@ -404,11 +404,11 @@ static HRESULT WINAPI IAVIEditStream_fnCopy(IAVIEditStream*iface,LONG*plStart, if (pEdit == NULL) return AVIERR_MEMORY; - hr = IAVIEditStream_Paste((PAVIEDITSTREAM)pEdit, &start, plLength, &This->IAVIStream_iface, + hr = IAVIEditStream_Paste(&pEdit->IAVIEditStream_iface, &start, plLength, &This->IAVIStream_iface, *plStart, *plStart + *plLength); *plStart = start; if (FAILED(hr)) - IAVIEditStream_Release((PAVIEDITSTREAM)pEdit); + IAVIEditStream_Release(&pEdit->IAVIEditStream_iface); else *ppResult = &This->IAVIStream_iface; diff --git a/dlls/avifil32/tmpfile.c b/dlls/avifil32/tmpfile.c index 62d283b1d11..ee7e772b5e2 100644 --- a/dlls/avifil32/tmpfile.c +++ b/dlls/avifil32/tmpfile.c @@ -274,5 +274,5 @@ PAVIFILE AVIFILE_CreateAVITempFile(int nStreams, const PAVISTREAM *ppStreams) } } - return (PAVIFILE)tmpFile; + return &tmpFile->IAVIFile_iface; }