[PATCH 2/2] mf: Reset END_OF_PRESENTATION flags after stopping the session.
Giovanni Mascellani
gmascellani at codeweavers.com
Thu Jun 10 10:33:57 CDT 2021
After end of presentation, the session should return to the stopped state,
which means that can be restarted again. END_OF_PRESENTATION flags should
not remain set in this case.
Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
---
dlls/mf/session.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c
index 9f233295773..ef2d15c9ef5 100644
--- a/dlls/mf/session.c
+++ b/dlls/mf/session.c
@@ -1061,6 +1061,7 @@ static void session_set_stopped(struct media_session *session, HRESULT status)
{
MediaEventType event_type;
IMFMediaEvent *event;
+ struct media_source *source;;
session->state = SESSION_STATE_STOPPED;
event_type = session->presentation.flags & SESSION_FLAG_END_OF_PRESENTATION ? MESessionEnded : MESessionStopped;
@@ -1071,6 +1072,11 @@ static void session_set_stopped(struct media_session *session, HRESULT status)
IMFMediaEventQueue_QueueEvent(session->event_queue, event);
IMFMediaEvent_Release(event);
}
+ 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;
+ }
session_command_complete(session);
}
--
2.32.0
More information about the wine-devel
mailing list