зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1034081 - Never seek before startTime. r=rillian
Only adjust seek target up to startTime --HG-- extra : rebase_source : 1154392a32c97b227f6293be06cbe1a31ab960e0
This commit is contained in:
Родитель
d0c5cd2fd1
Коммит
8f71a8484f
|
@ -750,8 +750,16 @@ nsresult WebMReader::SeekInternal(int64_t aTarget)
|
|||
uint64_t target = aTarget * NS_PER_USEC;
|
||||
|
||||
if (mSeekPreroll) {
|
||||
target = std::max(uint64_t(StartTime() * NS_PER_USEC),
|
||||
target - mSeekPreroll);
|
||||
uint64_t startTime = uint64_t(StartTime()) * NS_PER_USEC;
|
||||
if (target < mSeekPreroll || target - mSeekPreroll < startTime) {
|
||||
target = startTime;
|
||||
} else {
|
||||
target -= mSeekPreroll;
|
||||
}
|
||||
LOG(LogLevel::Debug,
|
||||
("Reader [%p] SeekPreroll: %f StartTime: %f AdjustedTarget: %f",
|
||||
this, double(mSeekPreroll) / NS_PER_S,
|
||||
double(startTime) / NS_PER_S, double(target) / NS_PER_S));
|
||||
}
|
||||
int r = nestegg_track_seek(mContext, trackToSeek, target);
|
||||
if (r != 0) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче