Bug 1330889. Part 3 - remove the mState check from HasLowBufferedData(). r=kikuo
authorJW Wang <jwwang@mozilla.com>
Fri, 13 Jan 2017 15:13:05 +0800
changeset 462273 4971ca440d80abc6a260e7f7af2f053c611881d5
parent 462272 befabe73c225a9b2e7ed205063010ac402c6d57b
child 462274 9584a95515b391be336e6316d8355e3fce2fb0a6
push id41685
push userbmo:jaws@mozilla.com
push dateMon, 16 Jan 2017 21:58:09 +0000
reviewerskikuo
bugs1330889
milestone53.0a1
Bug 1330889. Part 3 - remove the mState check from HasLowBufferedData(). r=kikuo We have |mBuffered.Ref().IsInvalid()| below to check if mBuffered is valid. MozReview-Commit-ID: KM88fSsCTlH
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -3176,18 +3176,16 @@ bool MediaDecoderStateMachine::HasLowBuf
 {
   MOZ_ASSERT(OnTaskQueue());
   return HasLowBufferedData(detail::LOW_DATA_THRESHOLD_USECS);
 }
 
 bool MediaDecoderStateMachine::HasLowBufferedData(int64_t aUsecs)
 {
   MOZ_ASSERT(OnTaskQueue());
-  MOZ_ASSERT(mState >= DECODER_STATE_DECODING,
-             "Must have loaded first frame for mBuffered to be valid");
 
   // If we don't have a duration, mBuffered is probably not going to have
   // a useful buffered range. Return false here so that we don't get stuck in
   // buffering mode for live streams.
   if (Duration().IsInfinite()) {
     return false;
   }