Commit a2fe0d57 authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

amstream: Return E_POINTER on NULL stream in IMediaStreamFilter::GetMediaStream().

parent 5042687d
...@@ -513,6 +513,9 @@ static HRESULT WINAPI filter_GetMediaStream(IMediaStreamFilter *iface, REFMSPID ...@@ -513,6 +513,9 @@ static HRESULT WINAPI filter_GetMediaStream(IMediaStreamFilter *iface, REFMSPID
TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(idPurpose), ppMediaStream); TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(idPurpose), ppMediaStream);
if (!ppMediaStream)
return E_POINTER;
for (i = 0; i < This->nb_streams; i++) for (i = 0; i < This->nb_streams; i++)
{ {
IAMMediaStream_GetInformation(This->streams[i], &purpose_id, NULL); IAMMediaStream_GetInformation(This->streams[i], &purpose_id, NULL);
......
...@@ -701,9 +701,13 @@ static void test_add_stream(void) ...@@ -701,9 +701,13 @@ static void test_add_stream(void)
ok(hr == S_FALSE, "Got hr %#x.\n", hr); ok(hr == S_FALSE, "Got hr %#x.\n", hr);
hr = IAMMultiMediaStream_GetMediaStream(mmstream, &MSPID_PrimaryAudio, NULL); hr = IAMMultiMediaStream_GetMediaStream(mmstream, &MSPID_PrimaryAudio, NULL);
todo_wine ok(hr == E_POINTER, "Got hr %#x.\n", hr); ok(hr == E_POINTER, "Got hr %#x.\n", hr);
hr = IMediaStreamFilter_GetMediaStream(stream_filter, &MSPID_PrimaryAudio, NULL); hr = IMediaStreamFilter_GetMediaStream(stream_filter, &MSPID_PrimaryAudio, NULL);
todo_wine ok(hr == E_POINTER, "Got hr %#x.\n", hr); ok(hr == E_POINTER, "Got hr %#x.\n", hr);
hr = IAMMultiMediaStream_GetMediaStream(mmstream, &MSPID_PrimaryVideo, NULL);
ok(hr == E_POINTER, "Got hr %#x.\n", hr);
hr = IMediaStreamFilter_GetMediaStream(stream_filter, &MSPID_PrimaryVideo, NULL);
ok(hr == E_POINTER, "Got hr %#x.\n", hr);
check_enum_stream(mmstream, stream_filter, 0, NULL); check_enum_stream(mmstream, stream_filter, 0, NULL);
......
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