Bug 1126465 - Pass consistent arguments to RequestVideoData invocations on subdecoders. r=mattwoodrow

This commit is contained in:
Bobby Holley 2015-01-29 22:11:11 -08:00
Родитель c10c436f32
Коммит a5507351d3
1 изменённых файлов: 5 добавлений и 4 удалений

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

@ -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;