Bug 1509548 - Remove early PullNewData return. r=padenot
authorAndreas Pehrson <apehrson@mozilla.com>
Thu, 29 Nov 2018 17:37:35 +0000
changeset 507975 311cee86bc66141b8f59be67cd203018f5799cae
parent 507974 dfde7b2c53a63c1fbeb90f984f912c8fd73da623
child 507976 daaecb62f373d33c60e6a77bcce01d27e19a3282
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1509548
milestone65.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 1509548 - Remove early PullNewData return. r=padenot Without knownTracksTime, StreamTracks::GetFirstTrackEnd() returns STREAM_TIME_MAX for an empty StreamTracks, so PullNewData() thinks no new data is needed. This circumvents that by always checking whether tracks need data. Differential Revision: https://phabricator.services.mozilla.com/D12928
dom/media/MediaStreamGraph.cpp
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -2520,19 +2520,16 @@ bool SourceMediaStream::PullNewData(Grap
   // Compute how much stream time we'll need assuming we don't block
   // the stream at all.
   StreamTime t = GraphTimeToStreamTime(aDesiredUpToTime);
   StreamTime current = mTracks.GetEarliestTrackEnd();
   LOG(LogLevel::Verbose,
       ("%p: Calling NotifyPull aStream=%p t=%f current end=%f", GraphImpl(),
        this, GraphImpl()->MediaTimeToSeconds(t),
        GraphImpl()->MediaTimeToSeconds(current)));
-  if (t <= current) {
-    return false;
-  }
   for (const TrackData& track : mUpdateTracks) {
     if (track.mCommands & TrackEventCommand::TRACK_EVENT_ENDED) {
       continue;
     }
     current = track.mEndOfFlushedData + track.mData->GetDuration();
     if (t <= current) {
       continue;
     }