Bug 1328547. part 3 - inline NeedToDecode{Audio,Video} and remove some checks. r=kaku

1. |mState != DECODER_STATE_SEEKING| is true in DecodingState.
2. mSentFirstFrameLoadedEvent is true in DecodingState.
3. mMinimizePreroll is false because pop events fire only after MDSM starts playing.

MozReview-Commit-ID: FTkXmtEnzY5

--HG--
extra : rebase_source : 30392be881ebdb96469189a584a57b89d60cc2b4
This commit is contained in:
JW Wang 2017-01-04 17:23:28 +08:00
Родитель 55f78f10f6
Коммит 12437440a3
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1998,13 +1998,13 @@ DecodingState::Enter()
mOnAudioPopped = AudioQueue().PopEvent().Connect(
OwnerThread(), [this] () {
if (mMaster->NeedToDecodeAudio()) {
if (mMaster->IsAudioDecoding() && !mMaster->HaveEnoughDecodedAudio()) {
mMaster->EnsureAudioDecodeTaskQueued();
}
});
mOnVideoPopped = VideoQueue().PopEvent().Connect(
OwnerThread(), [this] () {
if (mMaster->NeedToDecodeVideo()) {
if (mMaster->IsVideoDecoding() && !mMaster->HaveEnoughDecodedVideo()) {
mMaster->EnsureVideoDecodeTaskQueued();
}
});