summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-04-14 18:31:22 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-04-15 05:40:08 (GMT)
commit0c2f5376e921fa9badd87a3eb37d94868451248c (patch)
treedb9b3127942c2e334baa13ee15e2b7a63a0955db /src/3rdparty
parent7e598398ec161e3fc5df98ea754bd637d0c1ba30 (diff)
downloadQt-0c2f5376e921fa9badd87a3eb37d94868451248c.zip
Qt-0c2f5376e921fa9badd87a3eb37d94868451248c.tar.gz
Qt-0c2f5376e921fa9badd87a3eb37d94868451248c.tar.bz2
Phonon MMF: fix state changes emitted during playlist handling
This change is required by the testPlayBeforeFinish step in tst_mediaobject. This test starts playback of one track, then calls MediaObject::setCurrentSource() followed by MediaObject::play(). The step checks that the following stateChanged() signals are emitted by the MediaObject: 1. StoppedState (optionally) 2. LoadingState 3. BufferingState or PlayingState The state changes emitted by the Phonon MMF backend were: 1. PlayingState -> StoppedState 2. LoadingState -> PlayingState This patch fixes the discontinuity in state changes which occurred while processing a playlist. Reviewed-by: Frans Englich
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/phonon/mmf/abstractplayer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractplayer.cpp b/src/3rdparty/phonon/mmf/abstractplayer.cpp
index 8c3f5cb..77d7ae0 100644
--- a/src/3rdparty/phonon/mmf/abstractplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractplayer.cpp
@@ -48,6 +48,11 @@ MMF::AbstractPlayer::AbstractPlayer(const AbstractPlayer *player)
m_tickInterval = player->m_tickInterval;
m_transitionTime = player->m_transitionTime;
m_prefinishMark = player->m_prefinishMark;
+
+ // This is to prevent unwanted state transitions occurring as a result
+ // of MediaObject::switchToNextSource() during playlist playback.
+ if (StoppedState == player->m_state)
+ m_state = player->m_state;
}
}