Bug 1125776: Part8. We don't always need an init segment to be ready. r=mattwoodrow a=lmandel
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 04 Feb 2015 20:20:16 +1100
changeset 247739 7764d48b0a2773b65051601e7a673e943dbe7821
parent 247738 26f7afddd576b4542bc4d8009fff2c5513070c56
child 247740 cb47d8fa838fcfb834d2a74278895b535975213c
push id889
push usergijskruitbosch@gmail.com
push dateTue, 03 Mar 2015 18:12:54 +0000
reviewersmattwoodrow, lmandel
bugs1125776
milestone37.0a2
Bug 1125776: Part8. We don't always need an init segment to be ready. r=mattwoodrow a=lmandel If abort was called on the source buffer, the parser would have been reset. The content in the Track Buffer is still valid for playback.
dom/media/mediasource/TrackBuffer.cpp
--- a/dom/media/mediasource/TrackBuffer.cpp
+++ b/dom/media/mediasource/TrackBuffer.cpp
@@ -686,17 +686,17 @@ TrackBuffer::HasInitSegment()
   return mParser->HasCompleteInitData();
 }
 
 bool
 TrackBuffer::IsReady()
 {
   ReentrantMonitorAutoEnter mon(mParentDecoder->GetReentrantMonitor());
   MOZ_ASSERT((mInfo.HasAudio() || mInfo.HasVideo()) || mInitializedDecoders.IsEmpty());
-  return mParser->HasInitData() && (mInfo.HasAudio() || mInfo.HasVideo());
+  return mInfo.HasAudio() || mInfo.HasVideo();
 }
 
 bool
 TrackBuffer::ContainsTime(int64_t aTime, int64_t aTolerance)
 {
   ReentrantMonitorAutoEnter mon(mParentDecoder->GetReentrantMonitor());
   for (uint32_t i = 0; i < mInitializedDecoders.Length(); ++i) {
     nsRefPtr<dom::TimeRanges> r = new dom::TimeRanges();