diff --git a/dom/media/BaseMediaResource.h b/dom/media/BaseMediaResource.h index 78f93ea0607f..ed635356ed42 100644 --- a/dom/media/BaseMediaResource.h +++ b/dom/media/BaseMediaResource.h @@ -64,7 +64,7 @@ public: // Resume any downloads that have been suspended. virtual void Resume() = 0; - // The mode is initially MODE_PLAYBACK. + // The mode is initially MODE_METADATA. virtual void SetReadMode(MediaCacheStream::ReadMode aMode) = 0; // Returns true if the resource can be seeked to unbuffered ranges, i.e. diff --git a/dom/media/ChannelMediaDecoder.cpp b/dom/media/ChannelMediaDecoder.cpp index ca61203875ac..344252c4e09c 100644 --- a/dom/media/ChannelMediaDecoder.cpp +++ b/dom/media/ChannelMediaDecoder.cpp @@ -255,9 +255,6 @@ ChannelMediaDecoder::Load(nsIChannel* aChannel, rv = mResource->Open(aStreamListener); NS_ENSURE_SUCCESS(rv, rv); - // Set mode to METADATA since we are about to read metadata. - mResource->SetReadMode(MediaCacheStream::MODE_METADATA); - SetStateMachine(CreateStateMachine()); NS_ENSURE_TRUE(GetStateMachine(), NS_ERROR_FAILURE); diff --git a/dom/media/MediaCache.cpp b/dom/media/MediaCache.cpp index 53ed6f2a949f..a397fc3d72b6 100644 --- a/dom/media/MediaCache.cpp +++ b/dom/media/MediaCache.cpp @@ -507,7 +507,6 @@ MediaCacheStream::MediaCacheStream(ChannelMediaResource* aClient, , mStreamOffset(0) , mPlaybackBytesPerSecond(10000) , mPinCount(0) - , mCurrentMode(MODE_PLAYBACK) , mMetadataInPartialBlockBuffer(false) , mIsPrivateBrowsing(aIsPrivateBrowsing) { diff --git a/dom/media/MediaCache.h b/dom/media/MediaCache.h index 85f33eeb51d8..7622a548023c 100644 --- a/dom/media/MediaCache.h +++ b/dom/media/MediaCache.h @@ -523,7 +523,7 @@ private: // when mDidNotifyDataEnded is true. nsresult mNotifyDataEndedStatus; // The last reported read mode - ReadMode mCurrentMode; + ReadMode mCurrentMode = MODE_METADATA; // True if some data in mPartialBlockBuffer has been read as metadata bool mMetadataInPartialBlockBuffer; // The load ID of the current channel. Used to check whether the data is