Bug 943461. Part 10: Fix and simplify setting of mNextMainThreadFinished. r=padenot
authorRobert O'Callahan <robert@ocallahan.org>
Mon, 09 Dec 2013 18:08:02 +1300
changeset 162327 bed75e8c44b1b5fd21f8b1257ffd486b7dea75b8
parent 162326 4378e7bf2afcb67d47157c465666215b53ee6e12
child 162328 939ac6298d2a90e0bcafec32e83aa589fd8e0199
push idunknown
push userunknown
push dateunknown
reviewerspadenot
bugs943461
milestone29.0a1
Bug 943461. Part 10: Fix and simplify setting of mNextMainThreadFinished. r=padenot
content/media/MediaStreamGraph.cpp
--- a/content/media/MediaStreamGraph.cpp
+++ b/content/media/MediaStreamGraph.cpp
@@ -1005,19 +1005,17 @@ MediaStreamGraphImpl::PrepareUpdatesToMa
       if (!stream->MainThreadNeedsUpdates()) {
         continue;
       }
       StreamUpdate* update = mStreamUpdates.AppendElement();
       update->mGraphUpdateIndex = stream->mGraphUpdateIndices.GetAt(mCurrentTime);
       update->mStream = stream;
       update->mNextMainThreadCurrentTime =
         GraphTimeToStreamTime(stream, mCurrentTime);
-      update->mNextMainThreadFinished =
-        stream->mFinished &&
-        StreamTimeToGraphTime(stream, stream->GetBufferEnd()) <= mCurrentTime;
+      update->mNextMainThreadFinished = stream->mNotifiedFinished;
     }
     if (!mPendingUpdateRunnables.IsEmpty()) {
       mUpdateRunnables.MoveElementsFrom(mPendingUpdateRunnables);
     }
   }
 
   // Don't send the message to the main thread if it's not going to have
   // any work to do.