Bug 1123198 - Run reset parser state algorithm when aborting. r=cajbir, a=sledru
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 22 Jan 2015 21:19:02 +1100
changeset 240305 e3fd7a5f3fac218f6fe7192d13b27b9332c2773a
parent 240304 07461392c0052be0f19ad27601ce1c204835bdc2
child 240306 f59430f0ae4a08bd9578b65a72dc1b04c21b3c93
push id7514
push userryanvm@gmail.com
push dateSat, 24 Jan 2015 16:20:26 +0000
treeherdermozilla-aurora@166eac7ff25c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscajbir, sledru
bugs1123198
milestone37.0a2
Bug 1123198 - Run reset parser state algorithm when aborting. r=cajbir, a=sledru
dom/media/mediasource/SourceBuffer.cpp
--- a/dom/media/mediasource/SourceBuffer.cpp
+++ b/dom/media/mediasource/SourceBuffer.cpp
@@ -164,17 +164,17 @@ SourceBuffer::Abort(ErrorResult& aRv)
   if (mMediaSource->ReadyState() != MediaSourceReadyState::Open) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return;
   }
   if (mUpdating) {
     // TODO: Abort segment parser loop, buffer append, and stream append loop algorithms.
     AbortUpdating();
   }
-  // TODO: Run reset parser algorithm.
+  mTrackBuffer->ResetParserState();
   mAppendWindowStart = 0;
   mAppendWindowEnd = PositiveInfinity<double>();
 
   MSE_DEBUG("SourceBuffer(%p)::Abort() Discarding decoder", this);
   mTrackBuffer->DiscardDecoder();
 }
 
 void