DirectShow: fix some media player status issue.
Change the status to LoadedMedia if the media position is changed while in the EndOfMedia status. Change-Id: I6614fc184be80b11952b0e45af22ef030cfc36c5 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
This commit is contained in:
@@ -114,6 +114,11 @@ qint64 DirectShowPlayerControl::position() const
|
||||
|
||||
void DirectShowPlayerControl::setPosition(qint64 position)
|
||||
{
|
||||
if (m_status == QMediaPlayer::EndOfMedia) {
|
||||
m_status = QMediaPlayer::LoadedMedia;
|
||||
emit mediaStatusChanged(m_status);
|
||||
}
|
||||
|
||||
if (m_state == QMediaPlayer::StoppedState && m_pendingPosition != position) {
|
||||
m_pendingPosition = position;
|
||||
emit positionChanged(m_pendingPosition);
|
||||
|
||||
Reference in New Issue
Block a user