From acbd998749db4c09801647b21fcb081937160e3a Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Mon, 28 Oct 2013 16:50:59 +0100 Subject: [PATCH] WMF: emit positionChanged() signal when reaching the end of a media. This is necessary for QML MediaPlayer to report the correct position at the end of a media. Change-Id: Ifac2a721b850c726305d1a98e360da638b1fa87a Reviewed-by: Christian Stromme --- src/plugins/wmf/player/mfplayersession.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp index cca42e2f..adc762d6 100644 --- a/src/plugins/wmf/player/mfplayersession.cpp +++ b/src/plugins/wmf/player/mfplayersession.cpp @@ -1936,10 +1936,12 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent) m_request.command = CmdNone; m_request.prevCmd = CmdNone; - changeStatus(QMediaPlayer::EndOfMedia); m_varStart.vt = VT_I8; //keep reporting the final position after end of media m_varStart.hVal.QuadPart = m_duration; + emit positionChanged(position()); + + changeStatus(QMediaPlayer::EndOfMedia); break; case MEEndOfPresentationSegment: break;