Bug 1120241 - Schedule the state machine when setting logical decoder state. r=cpearce
authorBobby Holley <bobbyholley@gmail.com>
Thu, 29 Jan 2015 22:16:28 -0800
changeset 226770 21cb6497729fa22dd7bc03b80239ea2c33452fb8
parent 226769 b0e2b65a0cce5100141e9cb83651db4b876c2eb9
child 226771 70bb61e6791b505a1b370cc9ca6a356bf072d56b
push idunknown
push userunknown
push dateunknown
reviewerscpearce
bugs1120241
milestone38.0a1
Bug 1120241 - Schedule the state machine when setting logical decoder state. r=cpearce
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1293,17 +1293,19 @@ void MediaDecoder::ApplyStateToStateMach
       case PLAY_STATE_PLAYING:
         mDecoderStateMachine->Play();
         break;
       case PLAY_STATE_SEEKING:
         mDecoderStateMachine->Seek(mRequestedSeekTarget);
         mRequestedSeekTarget.Reset();
         break;
       default:
-        /* No action needed */
+        // The state machine checks for things like PAUSED in RunStateMachine.
+        // Make sure to keep it in the loop.
+        ScheduleStateMachineThread();
         break;
     }
   }
 }
 
 void MediaDecoder::PlaybackPositionChanged()
 {
   MOZ_ASSERT(NS_IsMainThread());