qcap: Assign to structs instead of using memcpy.
This commit is contained in:
parent
fd499df4d5
commit
90d83c42a2
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue