Nikolay Sivov : mf: Use original topology instance for both MESessionTopologySet and MESessionTopologyStatus.

Alexandre Julliard julliard at winehq.org
Fri Apr 10 13:56:08 CDT 2020


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Apr 10 17:06:24 2020 +0300

mf: Use original topology instance for both MESessionTopologySet and MESessionTopologyStatus.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mf/session.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/dlls/mf/session.c b/dlls/mf/session.c
index 47431c4968..5b9f720815 100644
--- a/dlls/mf/session.c
+++ b/dlls/mf/session.c
@@ -539,10 +539,18 @@ static void session_set_topo_status(struct media_session *session, HRESULT statu
     if (topo_status == MF_TOPOSTATUS_INVALID)
         return;
 
+    if (list_empty(&session->topologies))
+    {
+        FIXME("Unexpectedly empty topology queue.\n");
+        return;
+    }
+
     if (topo_status > session->presentation.topo_status)
     {
+        struct queued_topology *topology = LIST_ENTRY(list_head(&session->topologies), struct queued_topology, entry);
+
         param.vt = VT_UNKNOWN;
-        param.punkVal = (IUnknown *)session->presentation.current_topology;
+        param.punkVal = (IUnknown *)topology->topology;
 
         if (FAILED(MFCreateMediaEvent(MESessionTopologyStatus, &GUID_NULL, status, &param, &event)))
             return;




More information about the wine-cvs mailing list