Commit 79ed388e authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Factor out strmbase_source_cleanup().

parent 2922615d
...@@ -773,12 +773,17 @@ HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outp ...@@ -773,12 +773,17 @@ HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outp
return S_OK; return S_OK;
} }
static void strmbase_source_cleanup(BaseOutputPin *pin)
{
FreeMediaType(&pin->pin.mtCurrent);
if (pin->pAllocator)
IMemAllocator_Release(pin->pAllocator);
pin->pAllocator = NULL;
}
HRESULT WINAPI BaseOutputPin_Destroy(BaseOutputPin *This) HRESULT WINAPI BaseOutputPin_Destroy(BaseOutputPin *This)
{ {
FreeMediaType(&This->pin.mtCurrent); strmbase_source_cleanup(This);
if (This->pAllocator)
IMemAllocator_Release(This->pAllocator);
This->pAllocator = NULL;
CoTaskMemFree(This); CoTaskMemFree(This);
return S_OK; return S_OK;
} }
......
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