Bug 1317576. Part 5 - run Step() in CompletedState::Enter() without scheduling an additional cycle.
MDSM might have reached the end of playback. We want to notify 'playbackEnded' ASAP.
MozReview-Commit-ID: FYI6xTWuNSD
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1015,17 +1015,17 @@ class MediaDecoderStateMachine::Complete
public:
explicit CompletedState(Master* aPtr) : StateObject(aPtr) {}
void Enter()
{
// We've decoded all samples. We don't need decoders anymore.
Reader()->ReleaseResources();
- mMaster->ScheduleStateMachine();
+ Step();
}
void Exit() override
{
mSentPlaybackEndedEvent = false;
}
void Step() override