From ab2bcbbcb7379ef552ba8afb5f2f9054dc534264 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Thu, 18 Aug 2016 09:48:26 +0000 Subject: [PATCH] [QEDIT] Sync with Wine Staging 1.9.16. CORE-11866 svn path=/trunk/; revision=72268 --- .../dll/directx/wine/qedit/samplegrabber.c | 21 +++++++------------ reactos/media/doc/README.WINE | 2 +- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/reactos/dll/directx/wine/qedit/samplegrabber.c b/reactos/dll/directx/wine/qedit/samplegrabber.c index e1454c6a6bd..3f4cd133ece 100644 --- a/reactos/dll/directx/wine/qedit/samplegrabber.c +++ b/reactos/dll/directx/wine/qedit/samplegrabber.c @@ -77,8 +77,7 @@ static ULONG WINAPI Single_IEnumMediaTypes_Release(IEnumMediaTypes *iface) TRACE("(%p) new ref = %u\n", This, refCount); if (refCount == 0) { - if (This->mtype.pbFormat) - CoTaskMemFree(This->mtype.pbFormat); + CoTaskMemFree(This->mtype.pbFormat); CoTaskMemFree(This); } return refCount; @@ -264,10 +263,8 @@ static void SampleGrabber_cleanup(SG_Impl *This) IMemInputPin_Release(This->memOutput); if (This->grabberIface) ISampleGrabberCB_Release(This->grabberIface); - if (This->mtype.pbFormat) - CoTaskMemFree(This->mtype.pbFormat); - if (This->bufferData) - CoTaskMemFree(This->bufferData); + CoTaskMemFree(This->mtype.pbFormat); + CoTaskMemFree(This->bufferData); if(This->seekthru_unk) IUnknown_Release(This->seekthru_unk); } @@ -372,8 +369,7 @@ static void SampleGrabber_callback(SG_Impl *This, IMediaSample *sample) size = 0; EnterCriticalSection(&This->filter.csFilter); if (This->bufferLen != size) { - if (This->bufferData) - CoTaskMemFree(This->bufferData); + CoTaskMemFree(This->bufferData); This->bufferData = size ? CoTaskMemAlloc(size) : NULL; This->bufferLen = size; } @@ -574,8 +570,7 @@ SampleGrabber_ISampleGrabber_SetMediaType(ISampleGrabber *iface, const AM_MEDIA_ debugstr_guid(&type->majortype), debugstr_guid(&type->subtype), type->lSampleSize, debugstr_guid(&type->formattype), type->cbFormat); - if (This->mtype.pbFormat) - CoTaskMemFree(This->mtype.pbFormat); + CoTaskMemFree(This->mtype.pbFormat); This->mtype = *type; This->mtype.pUnk = NULL; if (type->cbFormat) { @@ -924,8 +919,7 @@ SampleGrabber_In_IPin_ReceiveConnection(IPin *iface, IPin *connector, const AM_M !IsEqualGUID(&This->sg->mtype.formattype,&FORMAT_None) && !IsEqualGUID(&This->sg->mtype.formattype,&type->formattype)) return VFW_E_TYPE_NOT_ACCEPTED; - if (This->sg->mtype.pbFormat) - CoTaskMemFree(This->sg->mtype.pbFormat); + CoTaskMemFree(This->sg->mtype.pbFormat); This->sg->mtype = *type; This->sg->mtype.pUnk = NULL; if (type->cbFormat) { @@ -1288,7 +1282,8 @@ HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppv) else obj->outer_unk = &obj->IUnknown_inner; - hr = CoCreateInstance(&CLSID_SeekingPassThru, (IUnknown*)obj, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&obj->seekthru_unk); + hr = CoCreateInstance(&CLSID_SeekingPassThru, &obj->IUnknown_inner, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (void**)&obj->seekthru_unk); if(hr) return hr; IUnknown_QueryInterface(obj->seekthru_unk, &IID_ISeekingPassThru, (void**)&passthru); diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 3a687fe77bd..f50a37857b6 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -38,7 +38,7 @@ reactos/dll/directx/wine/dplayx # Synced to WineStaging-1.9.16 reactos/dll/directx/wine/dsound # Synced to Wine-1.3.29 reactos/dll/directx/wine/dxdiagn # Synced to WineStaging-1.9.11 reactos/dll/directx/wine/msdmo # Synced to WineStaging-1.9.11 -reactos/dll/directx/wine/qedit # Synced to WineStaging-1.9.11 +reactos/dll/directx/wine/qedit # Synced to WineStaging-1.9.16 reactos/dll/directx/wine/quartz # Synced to WineStaging-1.9.11 reactos/dll/directx/wine/wined3d # Synced to WineStaging-1.9.4