winegstreamer: Use IMemAllocator::GetBuffer() directly.

BaseOutputPinImpl_GetDeliveryBuffer() is doing nothing helpful here. Note that
we cannot be unconnected at this point, or stream_thread() would not even be
running.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2022-02-06 20:59:39 -06:00 committed by Alexandre Julliard
parent 9d5d8df6f0
commit 8c7ad5fc39
1 changed files with 4 additions and 10 deletions

View File

@ -753,12 +753,9 @@ static void send_buffer(struct parser_source *pin, const struct wg_parser_event
{
uint32_t advance;
hr = BaseOutputPinImpl_GetDeliveryBuffer(&pin->pin, &sample, NULL, NULL, 0);
if (FAILED(hr))
if (FAILED(hr = IMemAllocator_GetBuffer(pin->pin.pAllocator, &sample, NULL, NULL, 0)))
{
if (hr != VFW_E_NOT_CONNECTED)
ERR("Failed to get a sample, hr %#lx.\n", hr);
ERR("Failed to get a sample, hr %#lx.\n", hr);
break;
}
@ -776,12 +773,9 @@ static void send_buffer(struct parser_source *pin, const struct wg_parser_event
}
else
{
hr = BaseOutputPinImpl_GetDeliveryBuffer(&pin->pin, &sample, NULL, NULL, 0);
if (FAILED(hr))
if (FAILED(hr = IMemAllocator_GetBuffer(pin->pin.pAllocator, &sample, NULL, NULL, 0)))
{
if (hr != VFW_E_NOT_CONNECTED)
ERR("Failed to get a sample, hr %#lx.\n", hr);
ERR("Failed to get a sample, hr %#lx.\n", hr);
}
else
{