Bug 1516754 - P1. Reset Pending Input Buffer during Reset Parser State Algorithm. r=kinetik a=lizzard
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 06 Feb 2019 00:30:35 +0000
changeset 515786 7d9ca706a2a3c97121801502c8e600db35e6ac2d
parent 515785 820fe56860e101a06a9dc6981576f7eb281b1722
child 515787 da05fc416eff1b94662c24a37d957381e4475385
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik, lizzard
bugs1516754
milestone66.0
Bug 1516754 - P1. Reset Pending Input Buffer during Reset Parser State Algorithm. r=kinetik a=lizzard Differential Revision: https://phabricator.services.mozilla.com/D18651
dom/media/mediasource/TrackBuffersManager.cpp
--- a/dom/media/mediasource/TrackBuffersManager.cpp
+++ b/dom/media/mediasource/TrackBuffersManager.cpp
@@ -442,16 +442,17 @@ void TrackBuffersManager::CompleteResetP
     track->ResetAppendState();
 
     // if we have been aborted, we may have pending frames that we are going
     // to discard now.
     track->mQueuedSamples.Clear();
   }
 
   // 7. Remove all bytes from the input buffer.
+  mPendingInputBuffer = nullptr;
   mInputBuffer = nullptr;
   if (mCurrentInputBuffer) {
     mCurrentInputBuffer->EvictAll();
     // The demuxer will be recreated during the next run of SegmentParserLoop.
     // As such we don't need to notify it that data has been removed.
     mCurrentInputBuffer = new SourceBufferResource();
   }