qcap: Assign to structs instead of using memcpy.

This commit is contained in:
Andrew Talbot 2008-03-12 20:32:04 +00:00 committed by Alexandre Julliard
parent fd499df4d5
commit 90d83c42a2
3 changed files with 5 additions and 5 deletions

View File

@ -37,7 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap);
HRESULT CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc)
{
memcpy(pDest, pSrc, sizeof(AM_MEDIA_TYPE));
*pDest = *pSrc;
if (!pSrc->pbFormat) return S_OK;
if (!(pDest->pbFormat = CoTaskMemAlloc(pSrc->cbFormat)))
return E_OUTOFMEMORY;

View File

@ -242,7 +242,7 @@ HRESULT OutputPin_Init(const PIN_INFO * pPinInfo, const ALLOCATOR_PROPERTIES * p
pPinImpl->pConnectSpecific = OutputPin_ConnectSpecific;
if (props)
{
memcpy(&pPinImpl->allocProps, props, sizeof(pPinImpl->allocProps));
pPinImpl->allocProps = *props;
if (pPinImpl->allocProps.cbAlign == 0)
pPinImpl->allocProps.cbAlign = 1;
}

View File

@ -293,9 +293,9 @@ HRESULT qcap_driver_get_format(const Capture *capBox, AM_MEDIA_TYPE ** mT)
CoTaskMemFree(mT[0]);
return E_OUTOFMEMORY;
}
memcpy(&mT[0]->majortype, &MEDIATYPE_Video, sizeof(GUID));
memcpy(&mT[0]->subtype, &MEDIASUBTYPE_RGB24, sizeof(GUID));
memcpy(&mT[0]->formattype, &FORMAT_VideoInfo, sizeof(GUID));
mT[0]->majortype = MEDIATYPE_Video;
mT[0]->subtype = MEDIASUBTYPE_RGB24;
mT[0]->formattype = FORMAT_VideoInfo;
mT[0]->bFixedSizeSamples = TRUE;
mT[0]->bTemporalCompression = FALSE;
mT[0]->pUnk = NULL;