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 466c3d3e0b
commit fedb2b5a07
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);
mDecoderInitialized = true;
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());
}
mLastParsedTimestamp = end;

View File

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