Bug 1386478 - don't cap the return value of GetEndTime(). r=jya

A chained ogg file contains multiple streams and timestamps will not
monolithically increase. The current code will cap AudioEndTime()
to the end time of the 1st stream and currentTime won't be updated
correctly when playback position reaches the 2nd stream or later ones.

http://searchfox.org/mozilla-central/rev/bbc1c59e460a27b20929b56489e2e55438de81fa/dom/media/MediaDecoderStateMachine.cpp#3636-3637

MozReview-Commit-ID: DbIspYmEjVv

--HG--
extra : rebase_source : 20004ae6c6d4e15dc8aeebf646efc62342514d24
This commit is contained in:
JW Wang 2017-08-02 10:45:48 +08:00
Родитель 7c6e2bd80c
Коммит 108a5c3b92
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -233,9 +233,7 @@ AudioSink::GetEndTime() const
NS_WARNING("Int overflow calculating audio end time");
return TimeUnit::Zero();
}
// As we may be resampling, rounding errors may occur. Ensure we never get
// past the original end time.
return std::min(mLastEndTime, played);
return played;
}
UniquePtr<AudioStream::Chunk>