mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
Bug 1049133 - Hook up eviction API; r=kinetik
This commit is contained in:
parent
18e54325c2
commit
564dd7ae57
@ -112,11 +112,16 @@ SubBufferDecoder::GetBuffered(dom::TimeRanges* aBuffered)
|
||||
int64_t
|
||||
SubBufferDecoder::ConvertToByteOffset(double aTime)
|
||||
{
|
||||
int64_t readerOffset = mReader->GetEvictionOffset(aTime);
|
||||
if (readerOffset >= 0) {
|
||||
return readerOffset;
|
||||
}
|
||||
|
||||
// Uses a conversion based on (aTime/duration) * length. For the
|
||||
// purposes of eviction this should be adequate since we have the
|
||||
// byte threshold as well to ensure data actually gets evicted and
|
||||
// we ensure we don't evict before the current playable point.
|
||||
if (mMediaDuration == -1) {
|
||||
if (mMediaDuration <= 0) {
|
||||
return -1;
|
||||
}
|
||||
int64_t length = GetResource()->GetLength();
|
||||
|
Loading…
Reference in New Issue
Block a user