From: Brendan McGrath <brendan(a)redmandi.com> --- dlls/mp3dmod/mp3dmod.c | 13 +++++++++++-- dlls/mp3dmod/tests/mp3dmod.c | 11 ++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dlls/mp3dmod/mp3dmod.c b/dlls/mp3dmod/mp3dmod.c index 4cdb92ce0b0..93a2a1a4d8f 100644 --- a/dlls/mp3dmod/mp3dmod.c +++ b/dlls/mp3dmod/mp3dmod.c @@ -329,9 +329,18 @@ static HRESULT WINAPI MediaObject_GetInputCurrentType(IMediaObject *iface, DWORD static HRESULT WINAPI MediaObject_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *type) { - FIXME("(%p)->(%ld, %p) stub!\n", iface, index, type); + struct mp3_decoder *dmo = impl_from_IMediaObject(iface); + TRACE("(%p)->(%ld, %p)\n", iface, index, type); - return E_NOTIMPL; + if (index) + return DMO_E_INVALIDSTREAMINDEX; + + if (!dmo->outtype_set) + return DMO_E_TYPE_NOT_SET; + + MoCopyMediaType(type, &dmo->outtype); + + return S_OK; } static HRESULT WINAPI MediaObject_GetInputSizeInfo(IMediaObject *iface, diff --git a/dlls/mp3dmod/tests/mp3dmod.c b/dlls/mp3dmod/tests/mp3dmod.c index 75ad52c4f21..107533e6316 100644 --- a/dlls/mp3dmod/tests/mp3dmod.c +++ b/dlls/mp3dmod/tests/mp3dmod.c @@ -718,18 +718,15 @@ static void test_media_types(void) ok(hr == DMO_E_INVALIDSTREAMINDEX, "Got hr %#lx.\n", hr); hr = IMediaObject_GetOutputCurrentType(dmo, 1, &mt); - todo_wine ok(hr == DMO_E_INVALIDSTREAMINDEX, "Got hr %#lx.\n", hr); hr = IMediaObject_GetOutputCurrentType(dmo, 0, &mt); - todo_wine ok(hr == DMO_E_TYPE_NOT_SET, "Got hr %#lx.\n", hr); hr = IMediaObject_SetOutputType(dmo, 0, &output_mt, DMO_SET_TYPEF_TEST_ONLY); ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaObject_GetOutputCurrentType(dmo, 0, &mt); - todo_wine ok(hr == DMO_E_TYPE_NOT_SET, "Got hr %#lx.\n", hr); output_mt.formattype = GUID_NULL; @@ -744,14 +741,10 @@ static void test_media_types(void) ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaObject_GetOutputCurrentType(dmo, 0, &mt); - todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); - if (hr == S_OK) - { - check_dmo_media_type(&mt, &output_mt); - MoFreeMediaType(&mt); - } + check_dmo_media_type(&mt, &output_mt); + MoFreeMediaType(&mt); IMediaObject_Release(dmo); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7409