Commit 292fd135 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

avifil32: Assign to structs instead of using memcpy.

parent 21b33471
......@@ -249,7 +249,7 @@ HRESULT WINAPI AVIFileOpenW(PAVIFILE *ppfile, LPCWSTR szFile, UINT uMode,
if (! AVIFILE_GetFileHandlerByExtension(szFile, &clsidHandler))
return AVIERR_UNSUPPORTED;
} else
memcpy(&clsidHandler, lpHandler, sizeof(clsidHandler));
clsidHandler = *lpHandler;
/* create instance of handler */
hr = CoCreateInstance(&clsidHandler, NULL, CLSCTX_INPROC, &IID_IAVIFile, (LPVOID*)ppfile);
......@@ -746,7 +746,7 @@ HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM *ppsCompressed,
if (AVIFILE_CLSIDFromString(szValue, &clsidHandler) != S_OK)
return AVIERR_UNSUPPORTED;
} else
memcpy(&clsidHandler, pclsidHandler, sizeof(clsidHandler));
clsidHandler = *pclsidHandler;
hr = CoCreateInstance(&clsidHandler, NULL, CLSCTX_INPROC, &IID_IAVIStream, (LPVOID*)ppsCompressed);
if (FAILED(hr) || *ppsCompressed == NULL)
......
......@@ -590,7 +590,7 @@ static HRESULT WINAPI IPersistFile_fnGetClassID(IPersistFile *iface,
if (pClassID == NULL)
return AVIERR_BADPARAM;
memcpy(pClassID, &CLSID_AVIFile, sizeof(CLSID_AVIFile));
*pClassID = CLSID_AVIFile;
return AVIERR_OK;
}
......
......@@ -78,7 +78,7 @@ static HRESULT AVIFILE_CreateClassFactory(const CLSID *pclsid, const IID *riid,
pClassFactory->lpVtbl = &iclassfact;
pClassFactory->dwRef = 0;
memcpy(&pClassFactory->clsid, pclsid, sizeof(pClassFactory->clsid));
pClassFactory->clsid = *pclsid;
hr = IClassFactory_QueryInterface((IClassFactory*)pClassFactory, riid, ppv);
if (FAILED(hr)) {
......
......@@ -212,7 +212,7 @@ static LPVOID WINAPI IGetFrame_fnGetFrame(IGetFrame *iface, LONG lPos)
if (This->lpOutFormat != NULL) {
BITMAPINFOHEADER bi;
memcpy(&bi, This->lpOutFormat, sizeof(bi));
bi = *This->lpOutFormat;
AVIFILE_CloseCompressor(This);
if (FAILED(IGetFrame_SetFormat(iface, &bi, NULL, 0, 0, -1, -1))) {
......
......@@ -540,7 +540,7 @@ static HRESULT WINAPI IPersistFile_fnGetClassID(IPersistFile *iface,
if (pClassID == NULL)
return AVIERR_BADPARAM;
memcpy(pClassID, &CLSID_WAVFile, sizeof(CLSID_WAVFile));
*pClassID = CLSID_WAVFile;
return AVIERR_OK;
}
......
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