Bug 1299072: P17. Return last decoding error once threshold reached. r=gerald

MozReview-Commit-ID: JbZkoErRFla

--HG--
extra : rebase_source : 95122ed1628685c20fe2a21840faaee5dc9dd010
This commit is contained in:
Jean-Yves Avenard 2016-09-13 13:03:21 +10:00
parent 670f93312d
commit ad3b418b6d

View File

@ -1249,11 +1249,11 @@ MediaFormatReader::Update(TrackType aTrack)
if (decoder.mError && !decoder.HasFatalError()) {
decoder.mDecodePending = false;
decoder.mError.reset();
if (++decoder.mNumOfConsecutiveError > decoder.mMaxConsecutiveError) {
NotifyError(aTrack);
NotifyError(aTrack, decoder.mError.ref());
return;
}
decoder.mError.reset();
LOG("%s decoded error count %d", TrackTypeToStr(aTrack),
decoder.mNumOfConsecutiveError);
media::TimeUnit nextKeyframe;