зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1337556 - [1.1] Add rewind heuristic when seeking past the target time. r=jya
This commit is contained in:
Родитель
18bc843966
Коммит
fa7f753f7a
|
@ -259,7 +259,9 @@ MP3TrackDemuxer::ScanUntil(const TimeUnit& aTime)
|
|||
}
|
||||
|
||||
if (Duration(mFrameIndex) > aTime) {
|
||||
FastSeek(aTime);
|
||||
// We've seeked past the target time, rewind back a little to correct it.
|
||||
const int64_t rewind = aTime.ToMicroseconds() / 100;
|
||||
FastSeek(aTime - TimeUnit::FromMicroseconds(rewind));
|
||||
}
|
||||
|
||||
if (Duration(mFrameIndex + 1) > aTime) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче