From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/mf/session.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 42b09ced2aa..23750a34b97 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -4461,6 +4461,19 @@ static HRESULT WINAPI session_events_callback_Invoke(IMFAsyncCallback *iface, IM } break; + + case MEError: + /* This is Wine-specific extension to allow media source to notify the session when they + * are being shutdown directly by the application. Native uses a different mechanism which + * hasn't been identified yet, and the native media source seem to implement it. + */ + EnterCriticalSection(&session->cs); + if (SUCCEEDED(IMFMediaEvent_GetStatus(event, &hr)) && hr == MF_E_SHUTDOWN && + session_get_media_source(session, (IMFMediaSource *)event_source)) + session_handle_source_shutdown(session); + LeaveCriticalSection(&session->cs); + break; + default: ; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8415