summaryrefslogtreecommitdiffstats
path: root/src/plugins/qnx
diff options
context:
space:
mode:
authorRoger Maclean <rmaclean@qnx.com>2015-02-27 10:26:14 -0500
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-12-03 11:57:51 +0000
commit8b00d8e5422566d2ca3e6c6fe1a1bbace1a0bff0 (patch)
tree955779239ca5a180ddd8c8feadcc1b84c82c5e00 /src/plugins/qnx
parent5ed9b6d6d77c420ea02aac5f01af1e9f85731f1b (diff)
QNX: Handling looping properly
On play, if we're at the end of media, set the position to the beginning. The code was previously setting the position to the last known position, likely just prior to the end which causes the last few frames of video to be played endlessly. Task-number: QTBUG-49668 Change-Id: I9613114294c22152dd66ae7111c38c8cdef5b907 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Diffstat (limited to 'src/plugins/qnx')
-rw-r--r--src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp b/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp
index 3ba640cd6..1cccbfa01 100644
--- a/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp
+++ b/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp
@@ -508,6 +508,9 @@ void MmRendererMediaPlayerControl::play()
return;
}
+ if (m_mediaStatus == QMediaPlayer::EndOfMedia)
+ m_position = 0;
+
setPositionInternal(m_position);
setVolumeInternal(m_muted ? 0 : m_volume);
setPlaybackRateInternal(m_rate);