зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1126465 - Pass consistent arguments to RequestVideoData invocations on subdecoders. r=mattwoodrow
This commit is contained in:
Родитель
c10c436f32
Коммит
a5507351d3
|
@ -53,7 +53,7 @@ MediaSourceReader::MediaSourceReader(MediaSourceDecoder* aDecoder)
|
|||
, mWaitingForSeekData(false)
|
||||
, mAudioIsSeeking(false)
|
||||
, mVideoIsSeeking(false)
|
||||
, mTimeThreshold(-1)
|
||||
, mTimeThreshold(0)
|
||||
, mDropAudioBeforeThreshold(false)
|
||||
, mDropVideoBeforeThreshold(false)
|
||||
, mEnded(false)
|
||||
|
@ -289,7 +289,7 @@ MediaSourceReader::RequestVideoData(bool aSkipToNextKeyframe, int64_t aTimeThres
|
|||
}
|
||||
// Fallback to using current reader.
|
||||
default:
|
||||
mVideoRequest.Begin(mVideoReader->RequestVideoData(aSkipToNextKeyframe, aTimeThreshold)
|
||||
mVideoRequest.Begin(mVideoReader->RequestVideoData(mDropVideoBeforeThreshold, mTimeThreshold)
|
||||
->RefableThen(GetTaskQueue(), __func__, this,
|
||||
&MediaSourceReader::OnVideoDecoded,
|
||||
&MediaSourceReader::OnVideoNotDecoded));
|
||||
|
@ -307,7 +307,7 @@ MediaSourceReader::RequestVideoDataComplete(int64_t aTime)
|
|||
MOZ_ASSERT(mVideoPromise.IsEmpty()); // Already rejected in ::Seek().
|
||||
return;
|
||||
}
|
||||
mVideoRequest.Begin(mVideoReader->RequestVideoData(false, 0)
|
||||
mVideoRequest.Begin(mVideoReader->RequestVideoData(mDropVideoBeforeThreshold, mTimeThreshold)
|
||||
->RefableThen(GetTaskQueue(), __func__, this,
|
||||
&MediaSourceReader::OnVideoDecoded,
|
||||
&MediaSourceReader::OnVideoNotDecoded));
|
||||
|
@ -331,13 +331,14 @@ MediaSourceReader::OnVideoDecoded(VideoData* aSample)
|
|||
if (aSample->mTime < mTimeThreshold) {
|
||||
MSE_DEBUG("MediaSourceReader(%p)::OnVideoDecoded mTime=%lld < mTimeThreshold=%lld",
|
||||
this, aSample->mTime, mTimeThreshold);
|
||||
mVideoRequest.Begin(mVideoReader->RequestVideoData(false, 0)
|
||||
mVideoRequest.Begin(mVideoReader->RequestVideoData(mDropVideoBeforeThreshold, mTimeThreshold)
|
||||
->RefableThen(GetTaskQueue(), __func__, this,
|
||||
&MediaSourceReader::OnVideoDecoded,
|
||||
&MediaSourceReader::OnVideoNotDecoded));
|
||||
return;
|
||||
}
|
||||
mDropVideoBeforeThreshold = false;
|
||||
mTimeThreshold = 0;
|
||||
}
|
||||
|
||||
mLastVideoTime = aSample->mTime + aSample->mDuration;
|
||||
|
|
Загрузка…
Ссылка в новой задаче