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.
--- 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();