Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mf/samplegrabber.c | 1 + dlls/mf/tests/mf.c | 4 ++++ 2 files changed, 5 insertions(+)
diff --git a/dlls/mf/samplegrabber.c b/dlls/mf/samplegrabber.c index 1919ce6220..21f89c0ad0 100644 --- a/dlls/mf/samplegrabber.c +++ b/dlls/mf/samplegrabber.c @@ -141,6 +141,7 @@ static HRESULT WINAPI sample_grabber_stream_QueryInterface(IMFStreamSink *iface, TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), obj);
if (IsEqualIID(riid, &IID_IMFStreamSink) || + IsEqualIID(riid, &IID_IMFMediaEventGenerator) || IsEqualIID(riid, &IID_IUnknown)) { *obj = &grabber->IMFStreamSink_iface; diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index ae9f58a4bc..5b300cd90f 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -2028,6 +2028,10 @@ static void test_sample_grabber(void) hr = IMFMediaSink_GetStreamSinkByIndex(sink, 0, &stream); ok(hr == S_OK, "Failed to get sink stream, hr %#x.\n", hr);
+ hr = IMFStreamSink_QueryInterface(stream, &IID_IMFMediaEventGenerator, (void **)&unk); + ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + IUnknown_Release(unk); + hr = IMFStreamSink_GetIdentifier(stream, &id); ok(hr == S_OK, "Failed to get stream id, hr %#x.\n", hr); ok(id == 0, "Unexpected id %#x.\n", id);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mf/sar.c | 1 + dlls/mf/tests/mf.c | 4 ++++ 2 files changed, 5 insertions(+)
diff --git a/dlls/mf/sar.c b/dlls/mf/sar.c index bb3eba7eee..f883163bde 100644 --- a/dlls/mf/sar.c +++ b/dlls/mf/sar.c @@ -1106,6 +1106,7 @@ static HRESULT WINAPI audio_renderer_stream_QueryInterface(IMFStreamSink *iface, TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), obj);
if (IsEqualIID(riid, &IID_IMFStreamSink) || + IsEqualIID(riid, &IID_IMFMediaEventGenerator) || IsEqualIID(riid, &IID_IUnknown)) { *obj = &renderer->IMFStreamSink_iface; diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 5b300cd90f..bf14ccf0fe 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -2860,6 +2860,10 @@ todo_wine hr = IMFMediaSink_GetStreamSinkByIndex(sink, 0, &stream_sink); ok(hr == S_OK, "Failed to get a stream, hr %#x.\n", hr);
+ hr = IMFStreamSink_QueryInterface(stream_sink, &IID_IMFMediaEventGenerator, (void **)&unk); + ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + IUnknown_Release(unk); + hr = IMFStreamSink_GetIdentifier(stream_sink, &id); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(!id, "Unexpected id.\n");