strmbase: Return void from InputPin_Init().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d16bc95b95
commit
a1d65ac38c
@ -1109,9 +1109,9 @@ static const IMemInputPinVtbl MemInputPin_Vtbl =
|
|||||||
MemInputPin_ReceiveCanBlock
|
MemInputPin_ReceiveCanBlock
|
||||||
};
|
};
|
||||||
|
|
||||||
static HRESULT InputPin_Init(const IPinVtbl *vtbl, const PIN_INFO *info,
|
static void strmbase_sink_init(BaseInputPin *pin, const IPinVtbl *vtbl,
|
||||||
const BaseInputPinFuncTable *func_table, CRITICAL_SECTION *cs,
|
const PIN_INFO *info, const BaseInputPinFuncTable *func_table, CRITICAL_SECTION *cs,
|
||||||
IMemAllocator *allocator, BaseInputPin *pin)
|
IMemAllocator *allocator)
|
||||||
{
|
{
|
||||||
memset(pin, 0, sizeof(*pin));
|
memset(pin, 0, sizeof(*pin));
|
||||||
strmbase_pin_init(&pin->pin, vtbl, &func_table->base, info, cs);
|
strmbase_pin_init(&pin->pin, vtbl, &func_table->base, info, cs);
|
||||||
@ -1120,8 +1120,6 @@ static HRESULT InputPin_Init(const IPinVtbl *vtbl, const PIN_INFO *info,
|
|||||||
if (pin->preferred_allocator)
|
if (pin->preferred_allocator)
|
||||||
IMemAllocator_AddRef(pin->preferred_allocator);
|
IMemAllocator_AddRef(pin->preferred_allocator);
|
||||||
pin->IMemInputPin_iface.lpVtbl = &MemInputPin_Vtbl;
|
pin->IMemInputPin_iface.lpVtbl = &MemInputPin_Vtbl;
|
||||||
|
|
||||||
return S_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size, const PIN_INFO * pPinInfo,
|
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size, const PIN_INFO * pPinInfo,
|
||||||
@ -1146,14 +1144,10 @@ HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size
|
|||||||
if (!pPinImpl)
|
if (!pPinImpl)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
if (SUCCEEDED(InputPin_Init(InputPin_Vtbl, pPinInfo, vtbl, pCritSec, allocator, pPinImpl)))
|
strmbase_sink_init(pPinImpl, InputPin_Vtbl, pPinInfo, vtbl, pCritSec, allocator);
|
||||||
{
|
|
||||||
*ppPin = &pPinImpl->pin.IPin_iface;
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
CoTaskMemFree(pPinImpl);
|
*ppPin = &pPinImpl->pin.IPin_iface;
|
||||||
return E_FAIL;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI BaseInputPin_Destroy(BaseInputPin *This)
|
HRESULT WINAPI BaseInputPin_Destroy(BaseInputPin *This)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user