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:
parent
8ba451f85b
commit
38726831c4
|
@ -254,15 +254,14 @@ static const IPersistPropertyBagVtbl PersistPropertyBagVtbl =
|
||||||
|
|
||||||
IUnknown* WINAPI QCAP_createAudioCaptureFilter(IUnknown *outer, HRESULT *phr)
|
IUnknown* WINAPI QCAP_createAudioCaptureFilter(IUnknown *outer, HRESULT *phr)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
|
||||||
AudioRecord *This = NULL;
|
AudioRecord *This = NULL;
|
||||||
|
|
||||||
FIXME("(%p, %p): the entire CLSID_AudioRecord implementation is just stubs\n", outer, phr);
|
FIXME("(%p, %p): the entire CLSID_AudioRecord implementation is just stubs\n", outer, phr);
|
||||||
|
|
||||||
This = CoTaskMemAlloc(sizeof(*This));
|
This = CoTaskMemAlloc(sizeof(*This));
|
||||||
if (This == NULL) {
|
if (This == NULL) {
|
||||||
hr = E_OUTOFMEMORY;
|
*phr = E_OUTOFMEMORY;
|
||||||
goto end;
|
return NULL;
|
||||||
}
|
}
|
||||||
memset(This, 0, sizeof(*This));
|
memset(This, 0, sizeof(*This));
|
||||||
This->IUnknown_iface.lpVtbl = &UnknownVtbl;
|
This->IUnknown_iface.lpVtbl = &UnknownVtbl;
|
||||||
|
@ -272,16 +271,9 @@ IUnknown* WINAPI QCAP_createAudioCaptureFilter(IUnknown *outer, HRESULT *phr)
|
||||||
else
|
else
|
||||||
This->outerUnknown = &This->IUnknown_iface;
|
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);
|
(DWORD_PTR)(__FILE__ ": AudioRecord.csFilter"), &AudioRecordFuncs);
|
||||||
|
|
||||||
end:
|
*phr = S_OK;
|
||||||
*phr = hr;
|
return (IUnknown*)&This->filter.IBaseFilter_iface;
|
||||||
if (SUCCEEDED(hr)) {
|
|
||||||
return (IUnknown*)&This->filter.IBaseFilter_iface;
|
|
||||||
} else {
|
|
||||||
if (This)
|
|
||||||
IBaseFilter_Release(&This->filter.IBaseFilter_iface);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,7 +210,8 @@ VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter *filter)
|
||||||
InterlockedIncrement(&filter->pin_version);
|
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->IBaseFilter_iface.lpVtbl = Vtbl;
|
||||||
This->refCount = 1;
|
This->refCount = 1;
|
||||||
|
@ -224,8 +225,6 @@ HRESULT WINAPI BaseFilter_Init(BaseFilter * This, const IBaseFilterVtbl *Vtbl, c
|
||||||
This->pin_version = 1;
|
This->pin_version = 1;
|
||||||
|
|
||||||
This->pFuncsTable = pBaseFuncsTable;
|
This->pFuncsTable = pBaseFuncsTable;
|
||||||
|
|
||||||
return S_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI BaseFilter_Destroy(BaseFilter * This)
|
HRESULT WINAPI BaseFilter_Destroy(BaseFilter * This)
|
||||||
|
|
|
@ -190,7 +190,8 @@ HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVend
|
||||||
|
|
||||||
VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter* This);
|
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);
|
HRESULT WINAPI BaseFilter_Destroy(BaseFilter * This);
|
||||||
|
|
||||||
/* Enums */
|
/* Enums */
|
||||||
|
|
Loading…
Reference in New Issue