Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/qasf/dmowrapper.c | 3 +++ dlls/qasf/tests/dmowrapper.c | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+)
diff --git a/dlls/qasf/dmowrapper.c b/dlls/qasf/dmowrapper.c index e2d4063828..8cf4404ece 100644 --- a/dlls/qasf/dmowrapper.c +++ b/dlls/qasf/dmowrapper.c @@ -673,6 +673,9 @@ static HRESULT dmo_wrapper_cleanup_stream(struct strmbase_filter *iface) IMediaObject *dmo; DWORD i;
+ if (!filter->dmo) + return E_FAIL; + IUnknown_QueryInterface(filter->dmo, &IID_IMediaObject, (void **)&dmo);
for (i = 0; i < filter->source_count; ++i) diff --git a/dlls/qasf/tests/dmowrapper.c b/dlls/qasf/tests/dmowrapper.c index 72c05ee49c..f76c0c3d9d 100644 --- a/dlls/qasf/tests/dmowrapper.c +++ b/dlls/qasf/tests/dmowrapper.c @@ -1995,6 +1995,23 @@ static void test_connect_pin(void) ok(!ref, "Got outstanding refcount %d.\n", ref); }
+static void test_uninitialized(void) +{ + IBaseFilter *filter = NULL; + HRESULT hr; + ULONG ref; + + hr = CoCreateInstance(&CLSID_DMOWrapperFilter, NULL, + CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IBaseFilter_Stop(filter); + ok(hr == E_FAIL, "Got hr %#x.\n", hr); + + ref = IBaseFilter_Release(filter); + ok(!ref, "Got outstanding refcount %d.\n", ref); +} + START_TEST(dmowrapper) { DWORD cookie; @@ -2022,6 +2039,7 @@ START_TEST(dmowrapper) test_media_types(); test_enum_media_types(); test_connect_pin(); + test_uninitialized();
CoRevokeClassObject(cookie); DMOUnregister(&testdmo_clsid, &DMOCATEGORY_AUDIO_DECODER);
Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/amstream/audiostream.c | 2 +- dlls/amstream/tests/amstream.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/amstream/audiostream.c b/dlls/amstream/audiostream.c index a19cb4ea96..60a2572b3b 100644 --- a/dlls/amstream/audiostream.c +++ b/dlls/amstream/audiostream.c @@ -1073,7 +1073,7 @@ static HRESULT WINAPI audio_sink_QueryId(IPin *iface, WCHAR **id) static HRESULT WINAPI audio_sink_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *mt) { TRACE("iface %p, mt %p.\n", iface, mt); - return S_OK; + return E_NOTIMPL; }
static HRESULT WINAPI audio_sink_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_media_types) diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 03c8660a42..43da41ae89 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -1989,7 +1989,7 @@ static void test_media_types(void) ok(!memcmp(pmt->pbFormat, &expect_wfx, pmt->cbFormat), "Format blocks didn't match.\n");
hr = IPin_QueryAccept(pin, pmt); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
CoTaskMemFree(pmt);
Signed-off-by: Zebediah Figura z.figura12@gmail.com
(Typo in the title; it should be QueryAccept, not QueryInterface).