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
authorRobert O'Callahan <robert@ocallahan.org>
Wed, 04 Dec 2013 19:00:26 +1300
changeset 162320 aecddf4c53d89c0d05a0705e7867f482a1204cb7
parent 162319 fcc3f7ba913e365e5779d28545163c977d2a38a7
child 162321 ac6bfc6f050e1645f7bb8a3e1004583d50e99d17
push idunknown
push userunknown
push dateunknown
reviewerspadenot
bugs943461
milestone29.0a1
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
content/media/MediaStreamGraph.cpp
--- 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)",