From 90fe52d086543fd26a700d85201e425fa49a3ec4 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 25 Mar 2015 23:33:13 +0100 Subject: WMF: don't resume playback after doing a seek while paused. Task-number: QTBUG-32746 Change-Id: I5a9ee96324e0ddc65311f47dc887bcb91b036fd2 Reviewed-by: Andy Shaw Reviewed-by: Yoann Lopes --- src/plugins/wmf/player/mfplayersession.cpp | 11 +++++++++-- 1 file 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; -- cgit v1.2.3