Module: wine Branch: master Commit: 98a2689f76ecbe097a0219d7ee332b4f6382bc59 URL: https://source.winehq.org/git/wine.git/?a=commit;h=98a2689f76ecbe097a0219d7e... Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Mon Feb 7 23:22:46 2022 -0600 strmbase: Get rid of the BaseOutputPinImpl_InitAllocator() helper. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/wine/strmbase.h | 1 - libs/strmbase/pin.c | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 868ea4c580a..3e92136b7f7 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -105,7 +105,6 @@ struct strmbase_sink_ops }; /* Base Pin */ -HRESULT WINAPI BaseOutputPinImpl_InitAllocator(struct strmbase_source *pin, IMemAllocator **allocator); HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(struct strmbase_source *pin, IMemInputPin *peer, IMemAllocator **allocator); HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt); diff --git a/libs/strmbase/pin.c b/libs/strmbase/pin.c index f6e4ef1c139..36784f60a23 100644 --- a/libs/strmbase/pin.c +++ b/libs/strmbase/pin.c @@ -677,11 +677,6 @@ static const IPinVtbl source_vtbl = source_NewSegment, }; -HRESULT WINAPI BaseOutputPinImpl_InitAllocator(struct strmbase_source *This, IMemAllocator **pMemAlloc) -{ - return CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (LPVOID*)pMemAlloc); -} - HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(struct strmbase_source *This, IMemInputPin *pPin, IMemAllocator **pAlloc) { @@ -690,8 +685,8 @@ HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(struct strmbase_source *This, hr = IMemInputPin_GetAllocator(pPin, pAlloc); if (hr == VFW_E_NO_ALLOCATOR) - /* Input pin provides no allocator, use standard memory allocator */ - hr = BaseOutputPinImpl_InitAllocator(This, pAlloc); + hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, + CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)pAlloc); if (SUCCEEDED(hr)) {