Rémi Bernon : mf/session: Complete session_start command even if already started.

Alexandre Julliard julliard at winehq.org
Wed Jun 23 16:10:08 CDT 2021


Module: wine
Branch: master
Commit: d78e5d999c0a80ff8f8cb80697ebd478d8606336
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d78e5d999c0a80ff8f8cb80697ebd478d8606336

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Wed Jun 23 14:03:04 2021 +0300

mf/session: Complete session_start command even if already started.

Seek is not implemented but not completing the command makes pending or
later queued commands to not be executed.

This partially fixes Guilty Gear Strive being stuck on character
selection screen.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mf/session.c | 41 +++++++++++++++++++++--------------------
 1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/dlls/mf/session.c b/dlls/mf/session.c
index 4e70aba410a..8b0d3cbf681 100644
--- a/dlls/mf/session.c
+++ b/dlls/mf/session.c
@@ -806,6 +806,26 @@ static struct topo_node *session_get_node_by_id(const struct media_session *sess
     return NULL;
 }
 
+static void session_command_complete(struct media_session *session)
+{
+    struct session_op *op;
+    struct list *e;
+
+    /* Pop current command, submit next. */
+    if ((e = list_head(&session->commands)))
+    {
+        op = LIST_ENTRY(e, struct session_op, entry);
+        list_remove(&op->entry);
+        IUnknown_Release(&op->IUnknown_iface);
+    }
+
+    if ((e = list_head(&session->commands)))
+    {
+        op = LIST_ENTRY(e, struct session_op, entry);
+        MFPutWorkItem(MFASYNC_CALLBACK_QUEUE_STANDARD, &session->commands_callback, &op->IUnknown_iface);
+    }
+}
+
 static void session_start(struct media_session *session, const GUID *time_format, const PROPVARIANT *start_position)
 {
     struct media_source *source;
@@ -840,6 +860,7 @@ static void session_start(struct media_session *session, const GUID *time_format
             break;
         case SESSION_STATE_STARTED:
             FIXME("Seeking is not implemented.\n");
+            session_command_complete(session);
             break;
         case SESSION_STATE_CLOSED:
             IMFMediaEventQueue_QueueEventParamVar(session->event_queue, MESessionStarted, &GUID_NULL,
@@ -850,26 +871,6 @@ static void session_start(struct media_session *session, const GUID *time_format
     }
 }
 
-static void session_command_complete(struct media_session *session)
-{
-    struct session_op *op;
-    struct list *e;
-
-    /* Pop current command, submit next. */
-    if ((e = list_head(&session->commands)))
-    {
-        op = LIST_ENTRY(e, struct session_op, entry);
-        list_remove(&op->entry);
-        IUnknown_Release(&op->IUnknown_iface);
-    }
-
-    if ((e = list_head(&session->commands)))
-    {
-        op = LIST_ENTRY(e, struct session_op, entry);
-        MFPutWorkItem(MFASYNC_CALLBACK_QUEUE_STANDARD, &session->commands_callback, &op->IUnknown_iface);
-    }
-}
-
 static void session_set_started(struct media_session *session)
 {
     struct media_source *source;




More information about the wine-cvs mailing list