Android: Fix reload check in onStateChanged().

The condition was missing the Uninitialized flag.

Change-Id: I555f4eae6cc33bee0a4925e626dd56041e4b0471
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This commit is contained in:
Christian Strømme
2014-03-27 10:56:16 +01:00
committed by The Qt Project
parent 9c3e685352
commit 5869d48441

View File

@@ -510,8 +510,10 @@ void QAndroidMediaPlayerControl::onVideoSizeChanged(qint32 width, qint32 height)
void QAndroidMediaPlayerControl::onStateChanged(qint32 state)
{
// If reloading, don't report state changes unless the new state is Prepared or Error.
if ((mState & JMediaPlayer::Stopped) && !(state & (JMediaPlayer::Prepared | JMediaPlayer::Error)))
if ((mState & JMediaPlayer::Stopped)
&& (state & (JMediaPlayer::Prepared | JMediaPlayer::Error | JMediaPlayer::Uninitialized)) == 0) {
return;
}
mState = state;
switch (mState) {