Bug 1337276 - discard the audio request so we won't add audio samples to a finished queue. r=kaku

MozReview-Commit-ID: JN9QwzfCaVK

--HG--
extra : rebase_source : 174364137e97cfd721ccc44368895f0921619a6f
This commit is contained in:
JW Wang 2017-02-07 14:33:52 +08:00
parent 3ea8b4e339
commit 13f5644c28

View File

@ -2318,6 +2318,11 @@ SeekingState::SeekCompleted()
// need to set these flags explicitly when seeking to the end.
mMaster->mAudioCompleted = true;
mMaster->mVideoCompleted = true;
// There might still be a pending audio request when doing video-only or
// next-frame seek. Discard it so we won't break the invariants of the
// COMPLETED state by adding audio samples to a finished queue.
mMaster->mAudioDataRequest.DisconnectIfExists();
}
// Cache mTarget for mSeekJob.Resolve() below will reset it.