Bug 1300479. Part 2 - replace empty cases with the default case.
MozReview-Commit-ID: 7iXd8UtivEn
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2274,23 +2274,16 @@ MediaDecoderStateMachine::RunStateMachin
mDelayedScheduler.Reset(); // Must happen on state machine task queue.
mDispatchedStateMachine = false;
MediaResource* resource = mResource;
NS_ENSURE_TRUE_VOID(resource);
switch (mState) {
- case DECODER_STATE_SHUTDOWN:
- case DECODER_STATE_DORMANT:
- case DECODER_STATE_WAIT_FOR_CDM:
- case DECODER_STATE_DECODING_METADATA:
- case DECODER_STATE_DECODING_FIRSTFRAME:
- return;
-
case DECODER_STATE_DECODING: {
if (mPlayState != MediaDecoder::PLAY_STATE_PLAYING && IsPlaying())
{
// We're playing, but the element/decoder is in paused state. Stop
// playing!
StopPlayback();
}
@@ -2343,20 +2336,16 @@ MediaDecoderStateMachine::RunStateMachin
DECODER_LOG("Changed state from BUFFERING to DECODING");
DECODER_LOG("Buffered for %.3lfs", (now - mBufferingStart).ToSeconds());
SetState(DECODER_STATE_DECODING);
NS_ASSERTION(IsStateMachineScheduled(), "Must have timer scheduled");
return;
}
- case DECODER_STATE_SEEKING: {
- return;
- }
-
case DECODER_STATE_COMPLETED: {
if (mPlayState != MediaDecoder::PLAY_STATE_PLAYING && IsPlaying()) {
StopPlayback();
}
// Play the remaining media. We want to run AdvanceFrame() at least
// once to ensure the current playback position is advanced to the
// end of the media, and so that we update the readyState.
if ((HasVideo() && !mVideoCompleted) ||
@@ -2389,16 +2378,19 @@ MediaDecoderStateMachine::RunStateMachin
mSentPlaybackEndedEvent = true;
// MediaSink::GetEndTime() must be called before stopping playback.
StopMediaSink();
}
return;
}
+
+ default:
+ return;
}
}
void
MediaDecoderStateMachine::Reset(TrackSet aTracks)
{
MOZ_ASSERT(OnTaskQueue());
DECODER_LOG("MediaDecoderStateMachine::Reset");