Bug 1117295 - Always allow a SourceMediaStream track to end if it exists. r=roc, r=jesup, a=sledru
authorAndreas Pehrson <pehrsons@gmail.com>
Wed, 28 Jan 2015 12:40:51 +0800
changeset 249514 b23ad0a91cd39e63f3fedba98fa960514626a7fc
parent 249513 cad51d6a9b41971d76ddbda607c1081014835749
child 249515 8f104b8ebe25d9948327d605f77acf635ec8994c
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, jesup, sledru
bugs1117295
milestone37.0a2
Bug 1117295 - Always allow a SourceMediaStream track to end if it exists. r=roc, r=jesup, a=sledru
dom/media/MediaStreamGraph.cpp
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -2472,22 +2472,19 @@ SourceMediaStream::DispatchWhenNotEnough
     aSignalThread->Dispatch(aSignalRunnable, 0);
   }
 }
 
 void
 SourceMediaStream::EndTrack(TrackID aID)
 {
   MutexAutoLock lock(mMutex);
-  // ::EndAllTrackAndFinished() can end these before the sources call this
-  if (!mFinished) {
-    TrackData *track = FindDataForTrack(aID);
-    if (track) {
-      track->mCommands |= TRACK_END;
-    }
+  TrackData *track = FindDataForTrack(aID);
+  if (track) {
+    track->mCommands |= TRACK_END;
   }
   if (auto graph = GraphImpl()) {
     graph->EnsureNextIteration();
   }
 }
 
 void
 SourceMediaStream::AdvanceKnownTracksTime(StreamTime aKnownTime)