Bug 1337556 - [1.1] Add rewind heuristic when seeking past the target time. r=jya

This commit is contained in:
Eugen Sawin 2017-02-09 19:39:34 +01:00
parent 18bc843966
commit fa7f753f7a

View File

@ -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) {