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 243626 f3b474a7e351
parent 243625 c76f32421541
child 243627 89994d9c2522
push id4420
push userryanvm@gmail.com
push date2015-02-02 16:43 +0000
treeherdermozilla-beta@e98376bbdf79 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, jesup, sledru
bugs1117295
milestone36.0
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)