Commit 2552a484 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

amstream/tests: Use IMemAllocator::GetBuffer() directly.

BaseOutputPinImpl_GetDeliveryBuffer() is doing nothing helpful here. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 8c7ad5fc
...@@ -4256,7 +4256,7 @@ static void test_audiostream_begin_flush_end_flush(void) ...@@ -4256,7 +4256,7 @@ static void test_audiostream_begin_flush_end_flush(void)
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
ok(hr == S_OK, "Got hr %#x.\n", hr); 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); ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample);
ok(hr == S_OK, "Got hr %#x.\n", hr); ok(hr == S_OK, "Got hr %#x.\n", hr);
...@@ -4272,7 +4272,7 @@ static void test_audiostream_begin_flush_end_flush(void) ...@@ -4272,7 +4272,7 @@ static void test_audiostream_begin_flush_end_flush(void)
ref = IMediaSample_Release(media_sample); ref = IMediaSample_Release(media_sample);
ok(!ref, "Got outstanding refcount %d.\n", ref); 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); ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample);
ok(hr == S_FALSE, "Got hr %#x.\n", hr); ok(hr == S_FALSE, "Got hr %#x.\n", hr);
...@@ -4289,7 +4289,7 @@ static void test_audiostream_begin_flush_end_flush(void) ...@@ -4289,7 +4289,7 @@ static void test_audiostream_begin_flush_end_flush(void)
hr = IPin_EndFlush(pin); hr = IPin_EndFlush(pin);
ok(hr == S_OK, "Got hr %#x.\n", hr); 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); ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample);
ok(hr == S_OK, "Got hr %#x.\n", hr); ok(hr == S_OK, "Got hr %#x.\n", hr);
...@@ -4408,7 +4408,7 @@ static IMediaSample *ammediastream_allocate_sample(struct testfilter *source, co ...@@ -4408,7 +4408,7 @@ static IMediaSample *ammediastream_allocate_sample(struct testfilter *source, co
BYTE *sample_data; BYTE *sample_data;
HRESULT hr; 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); ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMediaSample_GetPointer(sample, &sample_data); hr = IMediaSample_GetPointer(sample, &sample_data);
...@@ -5848,7 +5848,7 @@ static void test_ddrawstream_begin_flush_end_flush(void) ...@@ -5848,7 +5848,7 @@ static void test_ddrawstream_begin_flush_end_flush(void)
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
ok(hr == S_OK, "Got hr %#x.\n", hr); 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); ok(hr == S_OK, "Got hr %#x.\n", hr);
ammediastream_mem_input_pin = source.source.pMemInputPin; ammediastream_mem_input_pin = source.source.pMemInputPin;
...@@ -5866,7 +5866,7 @@ static void test_ddrawstream_begin_flush_end_flush(void) ...@@ -5866,7 +5866,7 @@ static void test_ddrawstream_begin_flush_end_flush(void)
ref = IMediaSample_Release(media_sample); ref = IMediaSample_Release(media_sample);
ok(!ref, "Got outstanding refcount %d.\n", ref); 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); ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample);
ok(hr == S_FALSE, "Got hr %#x.\n", hr); ok(hr == S_FALSE, "Got hr %#x.\n", hr);
...@@ -5883,7 +5883,7 @@ static void test_ddrawstream_begin_flush_end_flush(void) ...@@ -5883,7 +5883,7 @@ static void test_ddrawstream_begin_flush_end_flush(void)
hr = IPin_EndFlush(pin); hr = IPin_EndFlush(pin);
ok(hr == S_OK, "Got hr %#x.\n", hr); 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); ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample);
ok(hr == S_OK, "Got hr %#x.\n", hr); ok(hr == S_OK, "Got hr %#x.\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment