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>
This commit is contained in:
Roger Maclean
2015-02-27 10:26:14 -05:00
committed by Yoann Lopes
parent 5ed9b6d6d7
commit 8b00d8e542

View File

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