[PATCH 3/6] amstream/tests: Use IMemAllocator::GetBuffer() directly.
Zebediah Figura
zfigura at codeweavers.com
Sun Feb 6 20:59:40 CST 2022
BaseOutputPinImpl_GetDeliveryBuffer() is doing nothing helpful here.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
dlls/amstream/tests/amstream.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c
index d27bf801482..5b3e78e0583 100644
--- a/dlls/amstream/tests/amstream.c
+++ b/dlls/amstream/tests/amstream.c
@@ -4256,7 +4256,7 @@ static void test_audiostream_begin_flush_end_flush(void)
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- hr = BaseOutputPinImpl_GetDeliveryBuffer(&source.source, &media_sample, NULL, NULL, 0);
+ hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -4272,7 +4272,7 @@ static void test_audiostream_begin_flush_end_flush(void)
ref = IMediaSample_Release(media_sample);
ok(!ref, "Got outstanding refcount %d.\n", ref);
- hr = BaseOutputPinImpl_GetDeliveryBuffer(&source.source, &media_sample, NULL, NULL, 0);
+ hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample);
ok(hr == S_FALSE, "Got hr %#x.\n", hr);
@@ -4289,7 +4289,7 @@ static void test_audiostream_begin_flush_end_flush(void)
hr = IPin_EndFlush(pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- hr = BaseOutputPinImpl_GetDeliveryBuffer(&source.source, &media_sample, NULL, NULL, 0);
+ hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -4408,7 +4408,7 @@ static IMediaSample *ammediastream_allocate_sample(struct testfilter *source, co
BYTE *sample_data;
HRESULT hr;
- hr = BaseOutputPinImpl_GetDeliveryBuffer(&source->source, &sample, NULL, NULL, 0);
+ hr = IMemAllocator_GetBuffer(source->source.pAllocator, &sample, NULL, NULL, 0);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMediaSample_GetPointer(sample, &sample_data);
@@ -5848,7 +5848,7 @@ static void test_ddrawstream_begin_flush_end_flush(void)
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- hr = BaseOutputPinImpl_GetDeliveryBuffer(&source.source, &media_sample, NULL, NULL, 0);
+ hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ammediastream_mem_input_pin = source.source.pMemInputPin;
@@ -5866,7 +5866,7 @@ static void test_ddrawstream_begin_flush_end_flush(void)
ref = IMediaSample_Release(media_sample);
ok(!ref, "Got outstanding refcount %d.\n", ref);
- hr = BaseOutputPinImpl_GetDeliveryBuffer(&source.source, &media_sample, NULL, NULL, 0);
+ hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample);
ok(hr == S_FALSE, "Got hr %#x.\n", hr);
@@ -5883,7 +5883,7 @@ static void test_ddrawstream_begin_flush_end_flush(void)
hr = IPin_EndFlush(pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- hr = BaseOutputPinImpl_GetDeliveryBuffer(&source.source, &media_sample, NULL, NULL, 0);
+ hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample);
ok(hr == S_OK, "Got hr %#x.\n", hr);
--
2.34.1
More information about the wine-devel
mailing list