Nikolay Sivov (@nsivov) commented about dlls/mfmediaengine/main.c:
hr = IMFMediaSession_GetSessionCapabilities(engine->session, &caps);
if (SUCCEEDED(hr) && caps & MFSESSIONCAP_SEEK)
{
paused = IMFMediaEngineEx_IsPaused(iface);
position.vt = VT_I8;
position.hVal.QuadPart = min(max(0, seektime), engine->duration) * 10000000;
hr = IMFMediaSession_Start(engine->session, &GUID_NULL, &position);
if (SUCCEEDED(hr))
{
media_engine_set_flag(engine, FLAGS_ENGINE_SEEKING, TRUE);
IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_SEEKING, 0, 0);
if (paused)
hr = IMFMediaSession_Pause(engine->session);
}
}
There is a lot going on here, main problem I see is the need to make two state changes to pause again. Have you tried running this change on Windows, to see how smooth that is? It would be useful to have a test player application, where you can change positions, start, stop, etc. There is one for mfplay in Windows Classic samples, and it's a quite similar API.
Another thing, did you check that notification here is really blocking?