Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/amstream/multimedia.c | 3 +++ dlls/amstream/tests/amstream.c | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/amstream/multimedia.c b/dlls/amstream/multimedia.c index 48abcaf8b4..6fb3ebd17c 100644 --- a/dlls/amstream/multimedia.c +++ b/dlls/amstream/multimedia.c @@ -307,6 +307,9 @@ static HRESULT WINAPI multimedia_stream_AddMediaStream(IAMMultiMediaStream *ifac { IBaseFilter *dsound_render;
+ if (ret_stream) + return E_INVALIDARG; + if (!IsEqualGUID(PurposeId, &MSPID_PrimaryAudio)) { WARN("AMMSF_ADDDEFAULTRENDERER requested with id %s, returning MS_E_PURPOSEID.\n", debugstr_guid(PurposeId)); diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 67b504fd3f..a961b982cc 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -797,7 +797,7 @@ static void test_add_stream(void)
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, AMMSF_ADDDEFAULTRENDERER, &video_stream); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, AMMSF_ADDDEFAULTRENDERER, NULL); @@ -805,7 +805,7 @@ static void test_add_stream(void)
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, AMMSF_ADDDEFAULTRENDERER, &audio_stream); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, AMMSF_ADDDEFAULTRENDERER, NULL); @@ -826,9 +826,9 @@ static void test_add_stream(void) hr = IGraphBuilder_EnumFilters(graph, &enum_filters); ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IEnumFilters_Next(enum_filters, 3, filters, &count); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); - todo_wine ok(count == 2, "Got count %u.\n", count); - todo_wine ok(filters[1] == (IBaseFilter *)stream_filter, + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(count == 2, "Got count %u.\n", count); + ok(filters[1] == (IBaseFilter *)stream_filter, "Expected filter %p, got %p.\n", stream_filter, filters[1]); hr = IBaseFilter_GetClassID(filters[0], &clsid); ok(hr == S_OK, "Got hr %#x.\n", hr);