Bug 1310140. Part 5 - add DecodingFirstFrameState::HandleVideoSuspendTimeout().
MozReview-Commit-ID: 9CAE5XOQFtQ
--- 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