Skip to content

Commit

Permalink
strmbase: Get rid of the BaseOutputPinImpl_InitAllocator() helper.
Browse files Browse the repository at this point in the history
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
  • Loading branch information
Zebediah Figura authored and julliard committed Feb 8, 2022
1 parent 4e610a0 commit 98a2689
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion include/wine/strmbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
9 changes: 2 additions & 7 deletions libs/strmbase/pin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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))
{
Expand Down

0 comments on commit 98a2689

Please sign in to comment.