Bug 1215370: Maintain coded group continuity in sequence append mode when resetting parser state. r=gerald

W3C issue 29133.
This commit is contained in:
Jean-Yves Avenard 2015-10-26 17:49:00 +11:00
parent a38d52b60a
commit a0f576a061

View File

@ -376,7 +376,13 @@ TrackBuffersManager::CompleteResetParserState()
// to discard now.
track->mQueuedSamples.Clear();
}
// 6. Remove all bytes from the input buffer.
// 6. If the mode attribute equals "sequence", then set the group start timestamp to the group end timestamp
if (mSourceBufferAttributes->GetAppendMode() == SourceBufferAppendMode::Sequence) {
mGroupStartTimestamp = Some(mGroupEndTimestamp);
}
// 7. Remove all bytes from the input buffer.
mIncomingBuffers.Clear();
mInputBuffer = nullptr;
if (mCurrentInputBuffer) {
@ -401,7 +407,7 @@ TrackBuffersManager::CompleteResetParserState()
}
RecreateParser(true);
// 7. Set append state to WAITING_FOR_SEGMENT.
// 8. Set append state to WAITING_FOR_SEGMENT.
SetAppendState(AppendState::WAITING_FOR_SEGMENT);
// Reject our promise immediately.