Bug 1044498 - Pass saved init segment to decoder's NotifyDataAvailable. r=cajbir

This commit is contained in:
Matthew Gregan 2014-08-27 18:15:36 +12:00
parent c205b09b81
commit 31afea0173
2 changed files with 4 additions and 0 deletions

View File

@ -590,6 +590,9 @@ SourceBuffer::AppendData(const uint8_t* aData, uint32_t aLength, ErrorResult& aR
MSE_DEBUG("SourceBuffer(%p)::AppendData: Decoder marked as initialized.", this); MSE_DEBUG("SourceBuffer(%p)::AppendData: Decoder marked as initialized.", this);
mDecoderInitialized = true; mDecoderInitialized = true;
const nsTArray<uint8_t>& initData = mParser->InitData(); const nsTArray<uint8_t>& initData = mParser->InitData();
mDecoder->NotifyDataArrived(reinterpret_cast<const char*>(initData.Elements()),
initData.Length(),
0);
mDecoder->GetResource()->AppendData(initData.Elements(), initData.Length()); mDecoder->GetResource()->AppendData(initData.Elements(), initData.Length());
} }
mLastParsedTimestamp = end; mLastParsedTimestamp = end;

View File

@ -127,6 +127,7 @@ void WebMBufferedParser::Append(const unsigned char* aBuffer, uint32_t aLength,
} }
break; break;
case READ_TIMECODESCALE: case READ_TIMECODESCALE:
MOZ_ASSERT(mGotTimecodeScale);
mTimecodeScale = mVInt.mValue; mTimecodeScale = mVInt.mValue;
mState = READ_ELEMENT_ID; mState = READ_ELEMENT_ID;
break; break;