Bug 1306186. Part 6 - check if we can stop prerolling in the entry action of DecodingState.
Chances are we've decoded enough data when entering DecodingState. Otherwis we will never
start playback.
MozReview-Commit-ID: AMdd4xxQt6c
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -438,16 +438,17 @@ public:
if (mMaster->CheckIfDecodeComplete()) {
SetState(DECODER_STATE_COMPLETED);
return;
}
mDecodeStartTime = TimeStamp::Now();
mMaster->mIsPrerolling = true;
+ mMaster->MaybeStopPrerolling();
// Ensure that we've got tasks enqueued to decode data if we need to.
mMaster->DispatchDecodeTasksIfNeeded();
mMaster->ScheduleStateMachine();
}
void Exit() override