Bug 1283370. Part 4 - remove HasAudio(). r=kaku

We guarantee to have |!mReader->IsRequestingAudioData() && !mReader->IsWaitingAudioData()|
when there is no audio at all. We can remove the check for HasAudio().

MozReview-Commit-ID: KYYIq6n06Vr

--HG--
extra : rebase_source : d5e41b7fac5053ac36a1178a2f8e29eb077ada65
This commit is contained in:
JW Wang 2016-06-30 17:42:57 +08:00
parent 1d54d7845f
commit ce80f9e75b
2 changed files with 1 additions and 13 deletions

View File

@ -50,7 +50,6 @@ NextFrameSeekTask::NextFrameSeekTask(const void* aDecoderID,
, mAudioQueue(aAudioQueue)
, mVideoQueue(aVideoQueue)
, mCurrentTimeBeforeSeek(aCurrentMediaTime)
, mHasAudio(aInfo.HasAudio())
, mDuration(aDuration)
{
AssertOwnerThread();
@ -66,13 +65,6 @@ NextFrameSeekTask::~NextFrameSeekTask()
MOZ_ASSERT(mIsDiscarded);
}
bool
NextFrameSeekTask::HasAudio() const
{
AssertOwnerThread();
return mHasAudio;
}
void
NextFrameSeekTask::Discard()
{
@ -240,8 +232,7 @@ NextFrameSeekTask::IsAudioSeekComplete()
// Just make sure that we are not requesting or waiting for audio data. We
// don't really need to get an decoded audio data or get EOS here.
return !HasAudio() ||
(!mReader->IsRequestingAudioData() && !mReader->IsWaitingAudioData());
return !mReader->IsRequestingAudioData() && !mReader->IsWaitingAudioData();
}
bool

View File

@ -43,8 +43,6 @@ public:
private:
~NextFrameSeekTask();
bool HasAudio() const;
bool IsVideoDecoding() const;
nsresult EnsureVideoDecodeTaskQueued();
@ -85,7 +83,6 @@ private:
* Internal state.
*/
const int64_t mCurrentTimeBeforeSeek;
const bool mHasAudio;
media::TimeUnit mDuration;
MediaEventListener mAudioCallback;