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
Родитель a38d52b60a
Коммит a0f576a061
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -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.