Bug 1298217. Part 10 - Assert |mState == DECODER_STATE_DECODING| in StartBuffering() which is only called by MaybeStartBuffering() which also asserts that.
MozReview-Commit-ID: BhcNiiQZX3I
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2560,25 +2560,17 @@ MediaDecoderStateMachine::GetStatistics(
result.mDecoderPosition = mDecoderPosition;
result.mPlaybackPosition = mPlaybackOffset;
return result;
}
void MediaDecoderStateMachine::StartBuffering()
{
MOZ_ASSERT(OnTaskQueue());
-
- if (mState != DECODER_STATE_DECODING) {
- // We only move into BUFFERING state if we're actually decoding.
- // If we're currently doing something else, we don't need to buffer,
- // and more importantly, we shouldn't overwrite mState to interrupt
- // the current operation, as that could leave us in an inconsistent
- // state!
- return;
- }
+ MOZ_ASSERT(mState == DECODER_STATE_DECODING);
if (IsPlaying()) {
StopPlayback();
}
TimeDuration decodeDuration = TimeStamp::Now() - mDecodeStartTime;
// Go into quick buffering mode provided we've not just left buffering using
// a "quick exit". This stops us flip-flopping between playing and buffering