Commit 2922615d authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Return void from OutputPin_Init().

parent 81ec19dc
...@@ -740,14 +740,12 @@ static void strmbase_pin_init(BasePin *pin, const IPinVtbl *vtbl, ...@@ -740,14 +740,12 @@ static void strmbase_pin_init(BasePin *pin, const IPinVtbl *vtbl,
pin->pFuncsTable = func_table; pin->pFuncsTable = func_table;
} }
static HRESULT OutputPin_Init(const IPinVtbl *vtbl, const PIN_INFO *info, static void strmbase_source_init(BaseOutputPin *pin, const IPinVtbl *vtbl,
const BaseOutputPinFuncTable *func_table, CRITICAL_SECTION *cs, BaseOutputPin *pin) const PIN_INFO *info, const BaseOutputPinFuncTable *func_table, CRITICAL_SECTION *cs)
{ {
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);
pin->pFuncsTable = func_table; pin->pFuncsTable = func_table;
return S_OK;
} }
HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, const BaseOutputPinFuncTable* vtbl, LPCRITICAL_SECTION pCritSec, IPin ** ppPin) HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, const BaseOutputPinFuncTable* vtbl, LPCRITICAL_SECTION pCritSec, IPin ** ppPin)
...@@ -770,14 +768,9 @@ HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outp ...@@ -770,14 +768,9 @@ HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outp
if (!pPinImpl) if (!pPinImpl)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
if (SUCCEEDED(OutputPin_Init(OutputPin_Vtbl, pPinInfo, vtbl, pCritSec, pPinImpl))) strmbase_source_init(pPinImpl, OutputPin_Vtbl, pPinInfo, vtbl, pCritSec);
{
*ppPin = &pPinImpl->pin.IPin_iface; *ppPin = &pPinImpl->pin.IPin_iface;
return S_OK; return S_OK;
}
CoTaskMemFree(pPinImpl);
return E_FAIL;
} }
HRESULT WINAPI BaseOutputPin_Destroy(BaseOutputPin *This) HRESULT WINAPI BaseOutputPin_Destroy(BaseOutputPin *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