summaryrefslogtreecommitdiff
path: root/src/plugins/gstreamer/mediaplayer
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-04-18 22:03:42 +0200
committerLiang Qi <liang.qi@qt.io>2017-04-18 22:03:42 +0200
commit7caf543280bf8bdb0d3ea18d6c1a2537fdccfe6e (patch)
tree5c18b1ca8df1f39bb71cb1b579852f7b39894f1c /src/plugins/gstreamer/mediaplayer
parent6de2c8aca6736550d87057b0a3f025464bf21246 (diff)
parentd5d7dcfb15c0b5c5e9009b83fba922ea0b7e86f5 (diff)
downloadqtmultimedia-7caf543280bf8bdb0d3ea18d6c1a2537fdccfe6e.tar.gz
Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I7cd203eec77f3b5689c14b81b0862c5b70bab1a6
Diffstat (limited to 'src/plugins/gstreamer/mediaplayer')
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
index 54b31627e..0bfe76f2f 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
@@ -119,6 +119,9 @@ QMediaPlayerResourceSetInterface* QGstreamerPlayerControl::resources() const
qint64 QGstreamerPlayerControl::position() const
{
+ if (m_mediaStatus == QMediaPlayer::EndOfMedia)
+ return m_session->duration();
+
return m_pendingSeekPosition != -1 ? m_pendingSeekPosition : m_session->position();
}