Bug 1310140. Part 5 - add DecodingFirstFrameState::HandleVideoSuspendTimeout(). r=kaku,kamidphish
authorJW Wang <jwwang@mozilla.com>
Tue, 18 Oct 2016 10:40:52 +0800
changeset 318473 008b75b607a6a035d2df622a24df618416ebde64
parent 318472 8f14d38a0830c4728f2d9de5762f61612d6547bc
child 318474 bc9daff4c5e084224e23aab9afe372e1fe934ef4
push idunknown
push userunknown
push dateunknown
reviewerskaku, kamidphish
bugs1310140
milestone52.0a1
Bug 1310140. Part 5 - add DecodingFirstFrameState::HandleVideoSuspendTimeout(). r=kaku,kamidphish MozReview-Commit-ID: 9CAE5XOQFtQ
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -442,16 +442,21 @@ public:
   bool HandleEndOfStream() override
   {
     MaybeFinishDecodeFirstFrame();
     return true;
   }
 
   RefPtr<MediaDecoder::SeekPromise> HandleSeek(SeekTarget aTarget) override;
 
+  void HandleVideoSuspendTimeout() override
+  {
+    // Do nothing for we need to decode the 1st video frame to get the dimensions.
+  }
+
 private:
   // Notify FirstFrameLoaded if having decoded first frames and
   // transition to SEEKING if there is any pending seek, or DECODING otherwise.
   void MaybeFinishDecodeFirstFrame();
 };
 
 class MediaDecoderStateMachine::DecodingState
   : public MediaDecoderStateMachine::StateObject