diff --git a/dom/media/MediaStreamGraph.cpp b/dom/media/MediaStreamGraph.cpp index 8684de3a5b13..49e78f643e5b 100644 --- a/dom/media/MediaStreamGraph.cpp +++ b/dom/media/MediaStreamGraph.cpp @@ -1348,14 +1348,16 @@ MediaStreamGraphImpl::UpdateGraph(GraphTime aEndBlockingDecisions) stream->mStartBlocking = mStateComputedTime; } - // The loop is woken up so soon that IterationEnd() barely advances and we - // end up having aEndBlockingDecision == mStateComputedTime. - // Since stream blocking is computed in the interval of - // [mStateComputedTime, aEndBlockingDecision), it won't be computed at all. - // We should ensure next iteration so that pending blocking changes will be - // computed in next loop. + // If the loop is woken up so soon that IterationEnd() barely advances or + // if an offline graph is not currently rendering, we end up having + // aEndBlockingDecisions == mStateComputedTime. + // Since the process interval [mStateComputedTime, aEndBlockingDecision) is + // empty, Process() will not find any unblocked stream and so will not + // ensure another iteration. If the graph should be rendering, then ensure + // another iteration to render. if (ensureNextIteration || - aEndBlockingDecisions == mStateComputedTime) { + (aEndBlockingDecisions == mStateComputedTime && + mStateComputedTime < mEndTime)) { EnsureNextIteration(); } }