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@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); }