Bug 1299074. Part 1 - fix the comment of mSentFirstFrameLoadedEvent because it is not necessarily related to dormant state. draft
authorJW Wang <jwwang@mozilla.com>
Tue, 30 Aug 2016 16:11:58 +0800
changeset 407885 95903dbbbef092b7730a404538a1725a5ab76f24
parent 407874 e4018097fe178a252e46a7a1787283ed7859f2a0
child 407886 a9f838f051da7d7a47c7a34cec418410465a8853
push id28075
push userjwwang@mozilla.com
push dateWed, 31 Aug 2016 06:38:23 +0000
bugs1299074
milestone51.0a1
Bug 1299074. Part 1 - fix the comment of mSentFirstFrameLoadedEvent because it is not necessarily related to dormant state. MozReview-Commit-ID: 8YewoncY46P
dom/media/MediaDecoderStateMachine.h
--- a/dom/media/MediaDecoderStateMachine.h
+++ b/dom/media/MediaDecoderStateMachine.h
@@ -887,21 +887,21 @@ private:
 
   // True if we need to call FinishDecodeFirstFrame() upon frame decoding
   // succeeding.
   bool mDecodingFirstFrame;
 
   // True if we are back from DECODER_STATE_DORMANT state and
   // LoadedMetadataEvent was already sent.
   bool mSentLoadedMetadataEvent;
-  // True if we are back from DECODER_STATE_DORMANT state and
-  // FirstFrameLoadedEvent was already sent, then we can skip
-  // SetStartTime because the mStartTime already set before. Also we don't need
-  // to decode any audio/video since the MediaDecoder will trigger a seek
-  // operation soon.
+
+  // True if we've decoded first frames (thus having the start time) and
+  // notified the FirstFrameLoaded event. Note we can't initiate seek until the
+  // start time is known which happens when the first frames are decoded or we
+  // are playing an MSE stream (the start time is always assumed 0).
   bool mSentFirstFrameLoadedEvent;
 
   bool mSentPlaybackEndedEvent;
 
   // True if video decoding is suspended.
   bool mVideoDecodeSuspended;
 
   // Track enabling video decode suspension via timer