mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1136984 - Use correct units for comparing timestamps in TrackBuffer::RangeRemoval. r=jya
This commit is contained in:
parent
1d18ab6706
commit
a440a4ab84
@ -1008,7 +1008,7 @@ TrackBuffer::RangeRemoval(int64_t aStart, int64_t aEnd)
|
||||
for (size_t i = 0; i < decoders.Length(); ++i) {
|
||||
nsRefPtr<dom::TimeRanges> buffered = new dom::TimeRanges();
|
||||
decoders[i]->GetBuffered(buffered);
|
||||
if (buffered->GetEndTime() < aEnd) {
|
||||
if (int64_t(buffered->GetEndTime() * USECS_PER_S) < aEnd) {
|
||||
// Can be fully removed.
|
||||
MSE_DEBUG("remove all bufferedEnd=%f time=%f, size=%lld",
|
||||
buffered->GetEndTime(), time,
|
||||
@ -1027,7 +1027,7 @@ TrackBuffer::RangeRemoval(int64_t aStart, int64_t aEnd)
|
||||
} else {
|
||||
// Only trimming existing buffers.
|
||||
for (size_t i = 0; i < decoders.Length(); ++i) {
|
||||
if (aStart <= buffered->GetStartTime()) {
|
||||
if (aStart <= int64_t(buffered->GetStartTime() * USECS_PER_SEC)) {
|
||||
// It will be entirely emptied, can clear all data.
|
||||
decoders[i]->GetResource()->EvictAll();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user