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

strmbase: Return void from InputPin_Init().

parent d16bc95b
...@@ -1109,9 +1109,9 @@ static const IMemInputPinVtbl MemInputPin_Vtbl = ...@@ -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, ...@@ -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 ...@@ -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)
......
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