Bug 1296531 - Don't notify of queued data after a track ended. r=jesup
authorAndreas Pehrson <pehrsons@gmail.com>
Wed, 03 May 2017 14:15:11 +0200
changeset 433797 f1f93df303b687e84a03725efda07101aeceea4e
parent 433796 555d0dc71713b7fe23ea372155ee3447019306d9
child 433798 e70956077d8b3d3e67d23ec83af9bd1b70410f07
push id8114
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 16:33:21 +0000
treeherdermozilla-beta@73e0d89a540f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1296531
milestone58.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 1296531 - Don't notify of queued data after a track ended. r=jesup This could confuse listeners, since non-direct listeners would see more data than their direct counterparts. MozReview-Commit-ID: FC5rukQtrKL
dom/media/TrackUnionStream.cpp
--- a/dom/media/TrackUnionStream.cpp
+++ b/dom/media/TrackUnionStream.cpp
@@ -306,28 +306,28 @@ TrackUnionStream::TrackUnionStream()
       interval.mEnd = std::min(interval.mEnd, aTo);
       StreamTime inputEnd = source->GraphTimeToStreamTimeWithBlocking(interval.mEnd);
       StreamTime inputTrackEndPoint = STREAM_TIME_MAX;
 
       if (aInputTrack->IsEnded() &&
           aInputTrack->GetEnd() <= inputEnd) {
         inputTrackEndPoint = aInputTrack->GetEnd();
         *aOutputTrackFinished = true;
+        break;
       }
 
       if (interval.mStart >= interval.mEnd) {
         break;
       }
       StreamTime ticks = interval.mEnd - interval.mStart;
       next = interval.mEnd;
 
       StreamTime outputStart = outputTrack->GetEnd();
 
       if (interval.mInputIsBlocked) {
-        // Maybe the input track ended?
         segment->AppendNullData(ticks);
         STREAM_LOG(LogLevel::Verbose, ("TrackUnionStream %p appending %lld ticks of null data to track %d",
                    this, (long long)ticks, outputTrack->GetID()));
       } else if (InMutedCycle()) {
         segment->AppendNullData(ticks);
       } else {
         if (source->IsSuspended()) {
           segment->AppendNullData(aTo - aFrom);