Fixes: https://bugs.winehq.org/show_bug.cgi?id=43607
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/mfplat/main.c | 9 ++++++++- dlls/mfplat/tests/mfplat.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index 7c5be65..b0ac7a0 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -404,8 +404,15 @@ HRESULT WINAPI MFTUnregister(CLSID clsid) */ HRESULT WINAPI MFStartup(ULONG version, DWORD flags) { +#define MF_VERSION_XP (0x0001 << 16 | MF_API_VERSION) +#define MF_VERSION_WIN7 (0x0002 << 16 | MF_API_VERSION) + FIXME("(%u, %u): stub\n", version, flags); - return MF_E_BAD_STARTUP_VERSION; + + if(version != MF_VERSION_XP && version != MF_VERSION_WIN7) + return MF_E_BAD_STARTUP_VERSION; + + return S_OK; }
/*********************************************************************** diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index f85b00c..a260f6c 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -199,11 +199,15 @@ static void init_functions(void)
static void test_MFCreateMediaType(void) { +#define MF_VERSION_INVALID (0xdead << 16 | MF_API_VERSION) HRESULT hr; IMFMediaType *mediatype;
+ hr = MFStartup(MF_VERSION_INVALID, MFSTARTUP_FULL); + ok(hr == MF_E_BAD_STARTUP_VERSION, "got 0x%08x\n", hr); + hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08x\n", hr);
if(0) {