Bug 943461. Part 3: Like part 1, blocking calculations should note that a stream is only fully ended whenall of its tracks have finished playing out. r=padenot
--- a/content/media/MediaStreamGraph.cpp
+++ b/content/media/MediaStreamGraph.cpp
@@ -694,17 +694,18 @@ MediaStreamGraphImpl::RecomputeBlockingA
MediaStream* stream = aStreams[i];
stream->mBlockInThisPhase = false;
}
for (uint32_t i = 0; i < aStreams.Length(); ++i) {
MediaStream* stream = aStreams[i];
if (stream->mFinished) {
- GraphTime endTime = StreamTimeToGraphTime(stream, stream->GetBufferEnd());
+ GraphTime endTime = StreamTimeToGraphTime(stream,
+ stream->GetStreamBuffer().GetAllTracksEnd());
if (endTime <= aTime) {
STREAM_LOG(PR_LOG_DEBUG+1, ("MediaStream %p is blocked due to being finished", stream));
// We'll block indefinitely
MarkStreamBlocking(stream);
*aEnd = aEndBlockingDecisions;
continue;
} else {
STREAM_LOG(PR_LOG_DEBUG+1, ("MediaStream %p is finished, but not blocked yet (end at %f, with blocking at %f)",