зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1309516 part 2 - replace MediaFormatReader::DemuxStartTime() with MediaInfo::mStartTime; r=jya
MozReview-Commit-ID: JzO0Yv33ljL --HG-- extra : rebase_source : e59bc8aa168dfda9ec5e41fd81bd98a2b9391663 extra : intermediate-source : cca0e5eaf29e7cfdc32f8b66e217e0d8fb0fd0ea extra : source : 6af01ba877814a43b68bc004b0e28160216e7367
This commit is contained in:
Родитель
5bc83d3772
Коммит
784908b6e8
|
@ -1965,27 +1965,13 @@ MediaFormatReader::SetSeekTarget(const SeekTarget& aTarget)
|
|||
// Transform the seek target time to the demuxer timeline.
|
||||
if (!ForceZeroStartTime()) {
|
||||
target.SetTime(aTarget.GetTime() - TimeUnit::FromMicroseconds(StartTime())
|
||||
+ DemuxStartTime());
|
||||
+ mInfo.mStartTime);
|
||||
}
|
||||
|
||||
mOriginalSeekTarget = target;
|
||||
mFallbackSeekTime = mPendingSeekTime = Some(target.GetTime());
|
||||
}
|
||||
|
||||
TimeUnit
|
||||
MediaFormatReader::DemuxStartTime()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
MOZ_ASSERT(!ForceZeroStartTime());
|
||||
MOZ_ASSERT(HasAudio() || HasVideo());
|
||||
|
||||
const TimeUnit startTime =
|
||||
std::min(mAudio.mFirstDemuxedSampleTime.refOr(TimeUnit::FromInfinity()),
|
||||
mVideo.mFirstDemuxedSampleTime.refOr(TimeUnit::FromInfinity()));
|
||||
|
||||
return startTime.IsInfinite() ? TimeUnit::FromMicroseconds(0) : startTime;
|
||||
}
|
||||
|
||||
void
|
||||
MediaFormatReader::ScheduleSeek()
|
||||
{
|
||||
|
|
|
@ -553,7 +553,6 @@ private:
|
|||
|
||||
// Seeking objects.
|
||||
void SetSeekTarget(const SeekTarget& aTarget);
|
||||
media::TimeUnit DemuxStartTime();
|
||||
bool IsSeeking() const { return mPendingSeekTime.isSome(); }
|
||||
bool IsVideoSeeking() const
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче