Zebediah Figura : amstream/tests: Use IMemAllocator::GetBuffer() directly.
Alexandre Julliard
julliard at winehq.org
Mon Feb 7 15:56:03 CST 2022
Module: wine
Branch: master
Commit: 2552a4843646e8a842bbbf728389862a6b2027c5
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2552a4843646e8a842bbbf728389862a6b2027c5
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Sun Feb 6 20:59:40 2022 -0600
amstream/tests: Use IMemAllocator::GetBuffer() directly.
BaseOutputPinImpl_GetDeliveryBuffer() is doing nothing helpful here.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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);
More information about the wine-cvs
mailing list