Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/mp3dmod/mp3dmod.c | 6 ++++-- dlls/mp3dmod/tests/mp3dmod.c | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/dlls/mp3dmod/mp3dmod.c b/dlls/mp3dmod/mp3dmod.c index c9da2b8a354..1f3b0126b8e 100644 --- a/dlls/mp3dmod/mp3dmod.c +++ b/dlls/mp3dmod/mp3dmod.c @@ -136,9 +136,11 @@ static ULONG WINAPI MediaObject_Release(IMediaObject *iface)
static HRESULT WINAPI MediaObject_GetStreamCount(IMediaObject *iface, DWORD *input, DWORD *output) { - FIXME("(%p)->(%p, %p) stub!\n", iface, input, output); + TRACE("iface %p, input %p, output %p.\n", iface, input, output);
- return E_NOTIMPL; + *input = *output = 1; + + return S_OK; }
static HRESULT WINAPI MediaObject_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) diff --git a/dlls/mp3dmod/tests/mp3dmod.c b/dlls/mp3dmod/tests/mp3dmod.c index 75fd0e2c407..33cc6f3754d 100644 --- a/dlls/mp3dmod/tests/mp3dmod.c +++ b/dlls/mp3dmod/tests/mp3dmod.c @@ -286,6 +286,24 @@ static void test_aggregation(void) ok(hr == E_NOINTERFACE, "got %#x\n", hr); }
+static void test_stream_info(void) +{ + DWORD input_count, output_count, flags; + IMediaObject *dmo; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_CMP3DecMediaObject, NULL, CLSCTX_INPROC_SERVER, + &IID_IMediaObject, (void **)&dmo); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaObject_GetStreamCount(dmo, &input_count, &output_count); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(input_count == 1, "Got input count %u.\n", input_count); + ok(output_count == 1, "Got output count %u.\n", output_count); + + IMediaObject_Release(dmo); +} + START_TEST(mp3dmod) { IMediaObject *dmo; @@ -304,6 +322,7 @@ START_TEST(mp3dmod)
test_convert(); test_aggregation(); + test_stream_info();
CoUninitialize(); }