Android: Fix reload check in onStateChanged().
authorChristian Strømme <christian.stromme@digia.com>
Thu, 27 Mar 2014 09:56:16 +0000 (10:56 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 27 Mar 2014 15:43:39 +0000 (16:43 +0100)
The condition was missing the Uninitialized flag.

Change-Id: I555f4eae6cc33bee0a4925e626dd56041e4b0471
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp

index 4b836dd..f678083 100644 (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) {