summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2015-03-25 23:33:13 +0100
committerAndy Shaw <andy.shaw@digia.com>2015-03-31 11:15:18 +0000
commit90fe52d086543fd26a700d85201e425fa49a3ec4 (patch)
tree8ec439cdcbcd2c38c541841a7c85c6d34c92b5c7
parent92ea7cb89b4a5c41ef66998817e81c2048046649 (diff)
downloadqtmultimedia-90fe52d086543fd26a700d85201e425fa49a3ec4.tar.gz
WMF: don't resume playback after doing a seek while paused.
Task-number: QTBUG-32746 Change-Id: I5a9ee96324e0ddc65311f47dc887bcb91b036fd2 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
-rw-r--r--src/plugins/wmf/player/mfplayersession.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp
index 789d78b6f..377f1e4a2 100644
--- a/src/plugins/wmf/player/mfplayersession.cpp
+++ b/src/plugins/wmf/player/mfplayersession.cpp
@@ -1721,10 +1721,17 @@ void MFPlayerSession::updatePendingCommands(Command command)
if (m_state.command != command || m_pendingState == NoPending)
return;
- // The current pending command has completed.
+ // Seek while paused completed
if (m_pendingState == SeekPending && m_state.prevCmd == CmdPause) {
m_pendingState = NoPending;
- m_state.setCommand(CmdPause);
+ // A seek operation actually restarts playback. If scrubbing is possible, playback rate
+ // is set to 0.0 at this point and we just need to reset the current state to Pause.
+ // If scrubbing is not possible, the playback rate was not changed and we explicitly need
+ // to re-pause playback.
+ if (!canScrub())
+ pause();
+ else
+ m_state.setCommand(CmdPause);
}
m_pendingState = NoPending;