Bug 1102669 - Don't report HaveCurrentData when there are no input streams to TrackUnionStream. r=roc
authorAndreas Pehrson <pehrsons@gmail.com>
Thu, 20 Nov 2014 19:36:00 +0100
changeset 216818 790f6eefaa6af564be8145a8b3fd2a9a4a587926
parent 216817 58bdcf852b1c2b4ae05be9c2cfed151613cd4c28
child 216819 d917152c263d52832535fc43cbed1bb7f9bd8dc2
push id52146
push usercbook@mozilla.com
push dateFri, 21 Nov 2014 08:09:56 +0000
treeherdermozilla-inbound@3f5cfb8deed2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1102669
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1102669 - Don't report HaveCurrentData when there are no input streams to TrackUnionStream. r=roc
dom/media/TrackUnionStream.cpp
--- a/dom/media/TrackUnionStream.cpp
+++ b/dom/media/TrackUnionStream.cpp
@@ -76,18 +76,18 @@ TrackUnionStream::TrackUnionStream(DOMMe
       return;
     }
     nsAutoTArray<bool,8> mappedTracksFinished;
     nsAutoTArray<bool,8> mappedTracksWithMatchingInputTracks;
     for (uint32_t i = 0; i < mTrackMap.Length(); ++i) {
       mappedTracksFinished.AppendElement(true);
       mappedTracksWithMatchingInputTracks.AppendElement(false);
     }
-    bool allFinished = true;
-    bool allHaveCurrentData = true;
+    bool allFinished = !mInputs.IsEmpty();
+    bool allHaveCurrentData = !mInputs.IsEmpty();
     for (uint32_t i = 0; i < mInputs.Length(); ++i) {
       MediaStream* stream = mInputs[i]->GetSource();
       if (!stream->IsFinishedOnGraphThread()) {
         // XXX we really should check whether 'stream' has finished within time aTo,
         // not just that it's finishing when all its queued data eventually runs
         // out.
         allFinished = false;
       }