Blackberry: Fix spurious position udpates in playlists
Change-Id: I2652cab793034e55a4eb7e52bb534c22983d9517 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
committed by
Qt by Nokia
parent
637768d019
commit
5ce50b5fc7
@@ -557,7 +557,12 @@ bool BbMediaPlayerControl::nativeEventFilter(const QByteArray &eventType, void *
|
|||||||
|
|
||||||
// Prevent spurious position change events from overriding our own position, for example
|
// Prevent spurious position change events from overriding our own position, for example
|
||||||
// when setting the position to 0 in stop().
|
// when setting the position to 0 in stop().
|
||||||
if (m_state != QMediaPlayer::PlayingState)
|
// Also, don't change the position while we're loading the media, as then play() would
|
||||||
|
// set a wrong initial position.
|
||||||
|
if (m_state != QMediaPlayer::PlayingState ||
|
||||||
|
m_mediaStatus == QMediaPlayer::LoadingMedia ||
|
||||||
|
m_mediaStatus == QMediaPlayer::NoMedia ||
|
||||||
|
m_mediaStatus == QMediaPlayer::InvalidMedia)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const qint64 newPosition = QString::fromLatin1(mmrenderer_event_get_position(event)).toLongLong();
|
const qint64 newPosition = QString::fromLatin1(mmrenderer_event_get_position(event)).toLongLong();
|
||||||
|
|||||||
Reference in New Issue
Block a user