Bug 1121692 - Stop honoring aEndTime in MediaSourceReader::Seek. r=mattwoodrow

Tracking it is a pain, and it's only used by OggReader.
This commit is contained in:
Bobby Holley 2015-01-16 10:58:00 -08:00
parent a6eb8f9b93
commit 9ffecc6021
2 changed files with 5 additions and 8 deletions

View File

@ -49,7 +49,6 @@ MediaSourceReader::MediaSourceReader(MediaSourceDecoder* aDecoder)
, mLastAudioTime(0)
, mLastVideoTime(0)
, mPendingSeekTime(-1)
, mPendingEndTime(-1)
, mWaitingForSeekData(false)
, mTimeThreshold(-1)
, mDropAudioBeforeThreshold(false)
@ -623,10 +622,10 @@ MediaSourceReader::NotifyTimeRangesChanged()
}
nsRefPtr<MediaDecoderReader::SeekPromise>
MediaSourceReader::Seek(int64_t aTime, int64_t aEndTime)
MediaSourceReader::Seek(int64_t aTime, int64_t aIgnored /* Used only for ogg which is non-MSE */)
{
MSE_DEBUG("MediaSourceReader(%p)::Seek(aTime=%lld, aStart=%lld, aEnd=%lld, aCurrent=%lld)",
this, aTime, aEndTime);
MSE_DEBUG("MediaSourceReader(%p)::Seek(aTime=%lld, aEnd=%lld, aCurrent=%lld)",
this, aTime);
mSeekPromise.RejectIfExists(NS_OK, __func__);
nsRefPtr<SeekPromise> p = mSeekPromise.Ensure(__func__);
@ -639,7 +638,6 @@ MediaSourceReader::Seek(int64_t aTime, int64_t aEndTime)
// Store pending seek target in case the track buffers don't contain
// the desired time and we delay doing the seek.
mPendingSeekTime = aTime;
mPendingEndTime = aEndTime;
// Only increment the number of expected OnSeekCompleted
// notifications if we weren't already waiting for AttemptSeek
@ -660,7 +658,7 @@ MediaSourceReader::OnVideoSeekCompleted(int64_t aTime)
if (mAudioTrack) {
mAudioIsSeeking = true;
SwitchAudioReader(mPendingSeekTime);
mAudioReader->Seek(mPendingSeekTime, mPendingEndTime)
mAudioReader->Seek(mPendingSeekTime, 0)
->Then(GetTaskQueue(), __func__, this,
&MediaSourceReader::OnAudioSeekCompleted,
&MediaSourceReader::OnSeekFailed);
@ -711,7 +709,7 @@ MediaSourceReader::AttemptSeek()
if (mVideoTrack) {
mVideoIsSeeking = true;
SwitchVideoReader(mPendingSeekTime);
mVideoReader->Seek(mPendingSeekTime, mPendingEndTime)
mVideoReader->Seek(mPendingSeekTime, 0)
->Then(GetTaskQueue(), __func__, this,
&MediaSourceReader::OnVideoSeekCompleted,
&MediaSourceReader::OnSeekFailed);

View File

@ -191,7 +191,6 @@ private:
// to be added to the track buffer.
MediaPromiseHolder<SeekPromise> mSeekPromise;
int64_t mPendingSeekTime;
int64_t mPendingEndTime;
bool mWaitingForSeekData;
int64_t mTimeThreshold;