mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
Bug 1133625: Part2. Don't accept buffer exceeding our threshold. r=cajbir
YouTube attempts to load data in excess of 8MB when close to the end of the video, and never attempts to re-append should it error. As such, the sourcebuffer threshold can't be set to lower than 8MB with this change.
This commit is contained in:
parent
5d262eea0b
commit
bd730cc79a
@ -562,8 +562,9 @@ SourceBuffer::PrepareAppend(const uint8_t* aData, uint32_t aLength, ErrorResult&
|
||||
// See if we have enough free space to append our new data.
|
||||
// As we can only evict once we have playable data, we must give a chance
|
||||
// to the DASH player to provide a complete media segment.
|
||||
if ((mTrackBuffer->GetSize() > mEvictionThreshold - aLength) &&
|
||||
!mTrackBuffer->HasOnlyIncompleteMedia()) {
|
||||
if (aLength > mEvictionThreshold ||
|
||||
((mTrackBuffer->GetSize() > mEvictionThreshold - aLength) &&
|
||||
!mTrackBuffer->HasOnlyIncompleteMedia())) {
|
||||
aRv.Throw(NS_ERROR_DOM_QUOTA_EXCEEDED_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user