Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com --- dlls/amstream/filter.c | 3 +++ dlls/amstream/tests/amstream.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/amstream/filter.c b/dlls/amstream/filter.c index 3dff686b21..0e09e492cb 100644 --- a/dlls/amstream/filter.c +++ b/dlls/amstream/filter.c @@ -513,6 +513,9 @@ static HRESULT WINAPI filter_GetMediaStream(IMediaStreamFilter *iface, REFMSPID
TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(idPurpose), ppMediaStream);
+ if (!ppMediaStream) + return E_POINTER; + for (i = 0; i < This->nb_streams; i++) { IAMMediaStream_GetInformation(This->streams[i], &purpose_id, NULL); diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index bbad585d48..3fb77f277a 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -701,9 +701,13 @@ static void test_add_stream(void) ok(hr == S_FALSE, "Got hr %#x.\n", hr);
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); - 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);