Bug 998284. When entering the buffering state from AdvanceFrame, be prepared to accept a second's delay before reevaluating whether to exit buffering. r=cpearce

--HG--
extra : rebase_source : 2a7aab19c998f6977cb47d6300e2967be69bcbdf
This commit is contained in:
Robert O'Callahan 2014-03-25 00:58:11 +13:00
parent ec44fe9ea2
commit dba7d4c6ba

View File

@ -2466,7 +2466,10 @@ void MediaDecoderStateMachine::AdvanceFrame()
mReader->VideoQueue().PushFront(currentFrame.forget());
}
StartBuffering();
ScheduleStateMachine();
// Don't go straight back to the state machine loop since that might
// cause us to start decoding again and we could flip-flop between
// decoding and quick-buffering.
ScheduleStateMachine(USECS_PER_S);
return;
}
}