Bug 1329098. Part 5 - remove unnecessary checks and temps.
For mSentFirstFrameLoadedEvent is true in DecodingState.
MozReview-Commit-ID: 8zpsMAME8p6
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2041,31 +2041,25 @@ DecodingState::HandleEndOfStream()
MaybeStopPrerolling();
}
}
void
MediaDecoderStateMachine::
DecodingState::DispatchDecodeTasksIfNeeded()
{
- const bool needToDecodeAudio =
- mMaster->IsAudioDecoding() &&
- ((!mMaster->mSentFirstFrameLoadedEvent && AudioQueue().GetSize() == 0) ||
- (!mMaster->mMinimizePreroll && !mMaster->HaveEnoughDecodedAudio()));
-
- const bool needToDecodeVideo =
- mMaster->IsVideoDecoding() &&
- ((!mMaster->mSentFirstFrameLoadedEvent && VideoQueue().GetSize() == 0) ||
- (!mMaster->mMinimizePreroll && !mMaster->HaveEnoughDecodedVideo()));
-
- if (needToDecodeAudio) {
+ if (mMaster->IsAudioDecoding() &&
+ !mMaster->mMinimizePreroll &&
+ !mMaster->HaveEnoughDecodedAudio()) {
mMaster->EnsureAudioDecodeTaskQueued();
}
- if (needToDecodeVideo) {
+ if (mMaster->IsVideoDecoding() &&
+ !mMaster->mMinimizePreroll &&
+ !mMaster->HaveEnoughDecodedVideo()) {
mMaster->EnsureVideoDecodeTaskQueued();
}
}
void
MediaDecoderStateMachine::
DecodingState::MaybeStartBuffering()
{