mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1136576: Properly align source buffer starts with current decoder. r=cajbir
This commit is contained in:
parent
ca5abc580a
commit
b76671320c
@ -427,9 +427,15 @@ TrackBuffer::EvictData(double aPlaybackTime,
|
||||
|
||||
bool evicted = toEvict < (totalSize - aThreshold);
|
||||
if (evicted) {
|
||||
nsRefPtr<dom::TimeRanges> ranges = new dom::TimeRanges();
|
||||
mCurrentDecoder->GetBuffered(ranges);
|
||||
*aBufferStartTime = std::max(0.0, ranges->GetStartTime());
|
||||
if (playingDecoder) {
|
||||
nsRefPtr<dom::TimeRanges> ranges = new dom::TimeRanges();
|
||||
playingDecoder->GetBuffered(ranges);
|
||||
*aBufferStartTime = std::max(0.0, ranges->GetStartTime());
|
||||
} else {
|
||||
// We do not currently have data to play yet.
|
||||
// Avoid evicting anymore data to minimize rebuffering time.
|
||||
*aBufferStartTime = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
return evicted;
|
||||
|
Loading…
Reference in New Issue
Block a user