Commit 38726831 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Return void from BaseFilter_Init().

parent 8ba451f8
......@@ -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;
}
......@@ -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)
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment