Zebediah Figura : strmbase: Factor out strmbase_source_cleanup().
Module: wine Branch: master Commit: 79ed388e70e16d9d273481d089ce2cbf1df45a1d URL: https://source.winehq.org/git/wine.git/?a=commit;h=79ed388e70e16d9d273481d08... Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Jun 13 18:09:20 2019 -0500 strmbase: Factor out strmbase_source_cleanup(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/strmbase/pin.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index eb0f469..f1b24c3 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -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; }
participants (1)
-
Alexandre Julliard