From 90d83c42a296b3f447c8058c66a9f48b8c623456 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Wed, 12 Mar 2008 20:32:04 +0000 Subject: [PATCH] qcap: Assign to structs instead of using memcpy. --- dlls/qcap/enummedia.c | 2 +- dlls/qcap/pin.c | 2 +- dlls/qcap/v4l.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/qcap/enummedia.c b/dlls/qcap/enummedia.c index a82a94c9bf7..87a6e2d66dc 100644 --- a/dlls/qcap/enummedia.c +++ b/dlls/qcap/enummedia.c @@ -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; diff --git a/dlls/qcap/pin.c b/dlls/qcap/pin.c index 28d2f1a590d..44ce5e89c91 100644 --- a/dlls/qcap/pin.c +++ b/dlls/qcap/pin.c @@ -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; } diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 4ad2d9c2fd2..d4f9417a1b0 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -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;