Bug 1175037: Ensure MediaFormatReader is notified when new data is received. r=alfredo
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 16 Jun 2015 15:57:22 +1000
changeset 249725 77dfa576b46420965f4c3dc81736183025501fcb
parent 249724 bab941cb2c3c7cb2d045a198b09ca742808f7217
child 249726 97ace5e97d7b12bd550bff3f70e8269be755d4fa
push id28936
push userryanvm@gmail.com
push dateFri, 19 Jun 2015 20:34:42 +0000
treeherdermozilla-central@c319f262ce3e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersalfredo
bugs1175037
milestone41.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 1175037: Ensure MediaFormatReader is notified when new data is received. r=alfredo
dom/media/mediasource/SourceBuffer.cpp
--- a/dom/media/mediasource/SourceBuffer.cpp
+++ b/dom/media/mediasource/SourceBuffer.cpp
@@ -482,16 +482,18 @@ SourceBuffer::AppendDataCompletedWithSuc
     if (!mActive) {
       mActive = true;
       mMediaSource->SourceBufferIsActive(this);
       mMediaSource->QueueInitializationEvent();
       if (mIsUsingFormatReader) {
         mMediaSource->GetDecoder()->NotifyWaitingForResourcesStatusChanged();
       }
     }
+  }
+  if (mActive) {
     // Tell our parent decoder that we have received new data.
     // The information provided do not matter much so long as it is monotonically
     // increasing.
     mMediaSource->GetDecoder()->NotifyDataArrived(nullptr, 1, mReportedOffset++);
   }
 
   CheckEndTime();