Bug 1307013: Error once number of errors reach threshold. r?gerald
MozReview-Commit-ID: L6hI7CRSCCF
--- a/dom/media/MediaFormatReader.h
+++ b/dom/media/MediaFormatReader.h
@@ -323,17 +323,19 @@ private:
}
uint32_t mNumOfConsecutiveError;
uint32_t mMaxConsecutiveError;
Maybe<MediaResult> mError;
bool HasFatalError() const
{
- return mError.isSome() && mError.ref() != NS_ERROR_DOM_MEDIA_DECODE_ERR;
+ return mError.isSome() &&
+ (mError.ref() != NS_ERROR_DOM_MEDIA_DECODE_ERR ||
+ mNumOfConsecutiveError > mMaxConsecutiveError);
}
// If set, all decoded samples prior mTimeThreshold will be dropped.
// Used for internal seeking when a change of stream is detected or when
// encountering data discontinuity.
Maybe<InternalSeekTarget> mTimeThreshold;
// Time of last sample returned.
Maybe<media::TimeInterval> mLastSampleTime;