strmbase: Factor out strmbase_source_cleanup().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2922615d02
commit
79ed388e70
|
@ -773,12 +773,17 @@ HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outp
|
|||
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)
|
||||
{
|
||||
FreeMediaType(&This->pin.mtCurrent);
|
||||
if (This->pAllocator)
|
||||
IMemAllocator_Release(This->pAllocator);
|
||||
This->pAllocator = NULL;
|
||||
strmbase_source_cleanup(This);
|
||||
CoTaskMemFree(This);
|
||||
return S_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue