зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 31f6d645e9e5 ("Bug 1269178: P2. Ensure that no skip to next keyframe logic is activated while there's a pending seek. r=gerald")
This commit is contained in:
Родитель
cfc3509d01
Коммит
aab4c4df00
|
@ -520,10 +520,7 @@ MediaFormatReader::RequestVideoData(bool aSkipToNextKeyframe,
|
|||
}
|
||||
|
||||
media::TimeUnit timeThreshold{media::TimeUnit::FromMicroseconds(aTimeThreshold)};
|
||||
// Ensure we have no pending seek going as ShouldSkip could return out of date
|
||||
// information.
|
||||
if (!mVideo.HasInternalSeekPending() &&
|
||||
ShouldSkip(aSkipToNextKeyframe, timeThreshold)) {
|
||||
if (ShouldSkip(aSkipToNextKeyframe, timeThreshold)) {
|
||||
// Cancel any pending demux request.
|
||||
mVideo.mDemuxRequest.DisconnectIfExists();
|
||||
|
||||
|
@ -1001,9 +998,6 @@ void
|
|||
MediaFormatReader::InternalSeek(TrackType aTrack, const InternalSeekTarget& aTarget)
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
LOG("%s internal seek to %f",
|
||||
TrackTypeToStr(aTrack), aTarget.mTime.ToSeconds());
|
||||
|
||||
auto& decoder = GetDecoderData(aTrack);
|
||||
decoder.mTimeThreshold = Some(aTarget);
|
||||
RefPtr<MediaFormatReader> self = this;
|
||||
|
@ -1281,6 +1275,8 @@ MediaFormatReader::ResetDecode()
|
|||
MOZ_ASSERT(OnTaskQueue());
|
||||
LOGV("");
|
||||
|
||||
mAudio.mSeekRequest.DisconnectIfExists();
|
||||
mVideo.mSeekRequest.DisconnectIfExists();
|
||||
mSeekPromise.RejectIfExists(NS_OK, __func__);
|
||||
mSkipRequest.DisconnectIfExists();
|
||||
|
||||
|
|
|
@ -330,7 +330,6 @@ private:
|
|||
{
|
||||
// Clear demuxer related data.
|
||||
mDemuxRequest.DisconnectIfExists();
|
||||
mSeekRequest.DisconnectIfExists();
|
||||
mTrackDemuxer->Reset();
|
||||
}
|
||||
|
||||
|
@ -357,11 +356,6 @@ private:
|
|||
mNextStreamSourceID.reset();
|
||||
}
|
||||
|
||||
bool HasInternalSeekPending() const
|
||||
{
|
||||
return mTimeThreshold && !mTimeThreshold.ref().mHasSeeked;
|
||||
}
|
||||
|
||||
// Used by the MDSM for logging purposes.
|
||||
Atomic<size_t> mSizeOfQueue;
|
||||
// Used by the MDSM to determine if video decoding is hardware accelerated.
|
||||
|
|
Загрузка…
Ссылка в новой задаче