strmbase: Return void from BaseFilter_Init().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-05-14 19:41:59 -05:00 committed by Alexandre Julliard
parent 8ba451f85b
commit 38726831c4
3 changed files with 9 additions and 17 deletions

View file

@ -254,15 +254,14 @@ static const IPersistPropertyBagVtbl PersistPropertyBagVtbl =
IUnknown* WINAPI QCAP_createAudioCaptureFilter(IUnknown *outer, HRESULT *phr)
{
HRESULT hr;
AudioRecord *This = NULL;
FIXME("(%p, %p): the entire CLSID_AudioRecord implementation is just stubs\n", outer, phr);
This = CoTaskMemAlloc(sizeof(*This));
if (This == NULL) {
hr = E_OUTOFMEMORY;
goto end;
*phr = E_OUTOFMEMORY;
return NULL;
}
memset(This, 0, sizeof(*This));
This->IUnknown_iface.lpVtbl = &UnknownVtbl;
@ -272,16 +271,9 @@ IUnknown* WINAPI QCAP_createAudioCaptureFilter(IUnknown *outer, HRESULT *phr)
else
This->outerUnknown = &This->IUnknown_iface;
hr = BaseFilter_Init(&This->filter, &AudioRecordVtbl, &CLSID_AudioRecord,
BaseFilter_Init(&This->filter, &AudioRecordVtbl, &CLSID_AudioRecord,
(DWORD_PTR)(__FILE__ ": AudioRecord.csFilter"), &AudioRecordFuncs);
end:
*phr = hr;
if (SUCCEEDED(hr)) {
return (IUnknown*)&This->filter.IBaseFilter_iface;
} else {
if (This)
IBaseFilter_Release(&This->filter.IBaseFilter_iface);
return NULL;
}
*phr = S_OK;
return (IUnknown*)&This->filter.IBaseFilter_iface;
}

View file

@ -210,7 +210,8 @@ VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter *filter)
InterlockedIncrement(&filter->pin_version);
}
HRESULT WINAPI BaseFilter_Init(BaseFilter * This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable* pBaseFuncsTable)
void BaseFilter_Init(BaseFilter *This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid,
DWORD_PTR DebugInfo, const BaseFilterFuncTable *pBaseFuncsTable)
{
This->IBaseFilter_iface.lpVtbl = Vtbl;
This->refCount = 1;
@ -224,8 +225,6 @@ HRESULT WINAPI BaseFilter_Init(BaseFilter * This, const IBaseFilterVtbl *Vtbl, c
This->pin_version = 1;
This->pFuncsTable = pBaseFuncsTable;
return S_OK;
}
HRESULT WINAPI BaseFilter_Destroy(BaseFilter * This)

View file

@ -190,7 +190,8 @@ HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVend
VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter* This);
HRESULT WINAPI BaseFilter_Init(BaseFilter * This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable* pBaseFuncsTable);
void BaseFilter_Init(BaseFilter *filter, const IBaseFilterVtbl *vtbl,
const CLSID *clsid, DWORD_PTR debug_info, const BaseFilterFuncTable *func_table);
HRESULT WINAPI BaseFilter_Destroy(BaseFilter * This);
/* Enums */