Bug 1285248. Part 1 - the value of aSeekJob.mTarget.IsVideoOnly() is wrong because the members are reset in the move constructor.
mDoneAudioSeeking should be true for video-only seek.
Otherwise we might request audio while a pending request is already in progress
and hit the assertion.
MozReview-Commit-ID: IeVjoEChLAR
--- a/dom/media/AccurateSeekTask.cpp
+++ b/dom/media/AccurateSeekTask.cpp
@@ -40,17 +40,17 @@ AccurateSeekTask::AccurateSeekTask(const
MediaDecoderReaderWrapper* aReader,
SeekJob&& aSeekJob,
const MediaInfo& aInfo,
const media::TimeUnit& aEnd,
int64_t aCurrentMediaTime)
: SeekTask(aDecoderID, aThread, aReader, Move(aSeekJob))
, mCurrentTimeBeforeSeek(media::TimeUnit::FromMicroseconds(aCurrentMediaTime))
, mAudioRate(aInfo.mAudio.mRate)
- , mDoneAudioSeeking(!aInfo.HasAudio() || aSeekJob.mTarget.IsVideoOnly())
+ , mDoneAudioSeeking(!aInfo.HasAudio() || mSeekJob.mTarget.IsVideoOnly())
, mDoneVideoSeeking(!aInfo.HasVideo())
{
AssertOwnerThread();
// Bound the seek time to be inside the media range.
NS_ASSERTION(aEnd.ToMicroseconds() != -1, "Should know end time by now");
mSeekJob.mTarget.SetTime(
std::max(media::TimeUnit(), std::min(mSeekJob.mTarget.GetTime(), aEnd)));