mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1337556 - [1.1] Add rewind heuristic when seeking past the target time. r=jya
This commit is contained in:
parent
18bc843966
commit
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user