mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1126465 - Don't leave stale value in mPendingSeek when there's no audio track. r=mattwoodrow
This commit is contained in:
parent
ab598e783e
commit
0caec3f16d
@ -712,12 +712,12 @@ MediaSourceReader::CancelSeek()
|
||||
void
|
||||
MediaSourceReader::OnVideoSeekCompleted(int64_t aTime)
|
||||
{
|
||||
mPendingSeekTime = aTime;
|
||||
MOZ_ASSERT(mVideoIsSeeking);
|
||||
MOZ_ASSERT(!mAudioIsSeeking);
|
||||
mVideoIsSeeking = false;
|
||||
|
||||
if (mAudioTrack) {
|
||||
mPendingSeekTime = aTime;
|
||||
mAudioIsSeeking = true;
|
||||
SwitchAudioReader(mPendingSeekTime);
|
||||
mAudioReader->Seek(mPendingSeekTime, 0)
|
||||
@ -727,7 +727,8 @@ MediaSourceReader::OnVideoSeekCompleted(int64_t aTime)
|
||||
MSE_DEBUG("MediaSourceReader(%p)::Seek audio reader=%p", this, mAudioReader.get());
|
||||
return;
|
||||
}
|
||||
mSeekPromise.Resolve(mPendingSeekTime, __func__);
|
||||
mPendingSeekTime = -1;
|
||||
mSeekPromise.Resolve(aTime, __func__);
|
||||
}
|
||||
|
||||
void
|
||||
@ -738,8 +739,8 @@ MediaSourceReader::OnAudioSeekCompleted(int64_t aTime)
|
||||
MOZ_ASSERT(!mVideoIsSeeking);
|
||||
mAudioIsSeeking = false;
|
||||
|
||||
mSeekPromise.Resolve(mPendingSeekTime, __func__);
|
||||
mPendingSeekTime = -1;
|
||||
mSeekPromise.Resolve(aTime, __func__);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user