Skip to content

Commit

Permalink
quartz: Use IMemAllocator::GetBuffer() directly.
Browse files Browse the repository at this point in the history
BaseOutputPinImpl_GetDeliveryBuffer() is doing nothing helpful here.

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 7, 2022
1 parent 50fc9d7 commit 9d5d8df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions dlls/quartz/acmwrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed

while(hr == S_OK && ash.cbSrcLength)
{
hr = BaseOutputPinImpl_GetDeliveryBuffer(&This->source, &pOutSample, NULL, NULL, 0);
if (FAILED(hr))
if (FAILED(hr = IMemAllocator_GetBuffer(This->source.pAllocator, &pOutSample, NULL, NULL, 0)))
{
ERR("Failed to get sample, hr %#lx.\n", hr);
return hr;
Expand Down
4 changes: 2 additions & 2 deletions dlls/quartz/avidec.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
/* Update input size to match sample size */
This->pBihIn->biSizeImage = cbSrcStream;

hr = BaseOutputPinImpl_GetDeliveryBuffer(&This->source, &pOutSample, NULL, NULL, 0);
if (FAILED(hr)) {
if (FAILED(hr = IMemAllocator_GetBuffer(This->source.pAllocator, &pOutSample, NULL, NULL, 0)))
{
ERR("Failed to get sample, hr %#lx.\n", hr);
return hr;
}
Expand Down

0 comments on commit 9d5d8df

Please sign in to comment.