Bug 804387. Part 3: When a global underrun happens, don't insert blocked time, just cut that time out of the entire MediaStreamGraph timeline instead. r=jesup

--HG--
extra : rebase_source : 94f166e66f5401130b27867dd2b5ca039c704f14
This commit is contained in:
Robert O'Callahan 2013-02-04 23:04:25 +13:00
parent c9484fdea1
commit 6719ce2ae8

View File

@ -772,15 +772,7 @@ MediaStreamGraphImpl::UpdateCurrentTime()
SecondsToMediaTime((now - mCurrentTimeStamp).ToSeconds()) + mCurrentTime;
if (mStateComputedTime < nextCurrentTime) {
LOG(PR_LOG_WARNING, ("Media graph global underrun detected"));
LOG(PR_LOG_DEBUG, ("Advancing mStateComputedTime from %f to %f",
MediaTimeToSeconds(mStateComputedTime),
MediaTimeToSeconds(nextCurrentTime)));
// Advance mStateComputedTime to nextCurrentTime by
// adding blocked time to all streams starting at mStateComputedTime
for (uint32_t i = 0; i < mStreams.Length(); ++i) {
mStreams[i]->mBlocked.SetAtAndAfter(mStateComputedTime, true);
}
mStateComputedTime = nextCurrentTime;
nextCurrentTime = mStateComputedTime;
}
mCurrentTimeStamp = now;