Module: wine Branch: master Commit: b3e321dfd5e2d038fe0f70040e3a639fa4e9d23f URL: https://source.winehq.org/git/wine.git/?a=commit;h=b3e321dfd5e2d038fe0f70040...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Wed Jul 21 17:27:08 2021 +0300
mf/session: Fail start requests when no topology was set.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mf/session.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 80cc8ab7135..0377b19c51f 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -841,6 +841,15 @@ static void session_start(struct media_session *session, const GUID *time_format switch (session->state) { case SESSION_STATE_STOPPED: + + /* Start request with no current topology. */ + if (session->presentation.topo_status == MF_TOPOSTATUS_INVALID) + { + session_command_complete_with_event(session, MESessionStarted, MF_E_INVALIDREQUEST, NULL); + break; + } + + /* fallthrough */ case SESSION_STATE_PAUSED:
session->presentation.time_format = *time_format;