Giovanni Mascellani : mf/session: Reset END_OF_PRESENTATION flags when stopped.

Alexandre Julliard julliard at winehq.org
Tue Jun 15 16:19:26 CDT 2021


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

Author: Giovanni Mascellani <gmascellani at codeweavers.com>
Date:   Tue Jun 15 12:00:12 2021 +0300

mf/session: Reset END_OF_PRESENTATION flags when stopped.

Signed-off-by: Giovanni Mascellani <gmascellani 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 | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/dlls/mf/session.c b/dlls/mf/session.c
index a7f81e694c2..a7f58e0fb29 100644
--- a/dlls/mf/session.c
+++ b/dlls/mf/session.c
@@ -943,6 +943,17 @@ static void session_pause(struct media_session *session)
         session_set_paused(session, hr);
 }
 
+static void session_clear_end_of_presentation(struct media_session *session)
+{
+    struct media_source *source;
+
+    session->presentation.flags &= ~SESSION_FLAG_END_OF_PRESENTATION;
+    LIST_FOR_EACH_ENTRY(source, &session->presentation.sources, struct media_source, entry)
+    {
+        source->flags &= ~SOURCE_FLAG_END_OF_PRESENTATION;
+    }
+}
+
 static void session_set_stopped(struct media_session *session, HRESULT status)
 {
     MediaEventType event_type;
@@ -957,6 +968,7 @@ static void session_set_stopped(struct media_session *session, HRESULT status)
         IMFMediaEventQueue_QueueEvent(session->event_queue, event);
         IMFMediaEvent_Release(event);
     }
+    session_clear_end_of_presentation(session);
     session_command_complete(session);
 }
 




More information about the wine-cvs mailing list