Stefan Dösinger (@stefan) commented about dlls/mfmediaengine/tests/mfmediaengine.c:
+ notify = create_callback(); + ok(!!notify, "notify was %p.\n", notify); + + engine = create_media_engine(¬ify->IMFMediaEngineNotify_iface, (IUnknown *)d3d11_dev, DXGI_FORMAT_R32G32B32_FLOAT); + ok(!!engine, "engine was %p.\n", engine); + + filename = load_resource(L"test.mp4"); + ok(!!filename, "filename was %s.\n", debugstr_w(filename)); + + /* Actual tests */ + hr = IMFMediaEngine_SetSource(engine, filename); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + + /* Skip tests if media engine init fails. Currently always happening in Wine! */ + if (!WaitForSingleObject(notify->event_error, 100)) + goto done; is there no better way to check for the result of SetSource than to wait an arbitrary amount of time for a callback?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1046#note_10527