Bug 1329098. Part 3 - remove some temp vairables. r=kaku
authorJW Wang <jwwang@mozilla.com>
Fri, 06 Jan 2017 15:36:38 +0800
changeset 328493 e675289447f5f45b59333a07cd4eefba25391670
parent 328492 17d0086ac024660fd2a9de21eefd3261d2366a2c
child 328494 8f579fb33b2574df84cd832d96fffa9cdfa2a80e
push id35790
push userjwwang@mozilla.com
push dateMon, 09 Jan 2017 07:22:01 +0000
treeherderautoland@c00b89907a83 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1329098
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1329098. Part 3 - remove some temp vairables. r=kaku MozReview-Commit-ID: 3gz79Tzidtf
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2213,29 +2213,23 @@ NextFrameSeekingState::HandleVideoNotDec
       mMaster->DecodeError(aError);
   }
 }
 
 void
 MediaDecoderStateMachine::
 BufferingState::DispatchDecodeTasksIfNeeded()
 {
-  const bool needToDecodeAudio =
-    mMaster->IsAudioDecoding() &&
-   !mMaster->HaveEnoughDecodedAudio();
-
-  const bool needToDecodeVideo =
-    mMaster->IsVideoDecoding() &&
-    !mMaster->HaveEnoughDecodedVideo();
-
-  if (needToDecodeAudio) {
+  if (mMaster->IsAudioDecoding() &&
+      !mMaster->HaveEnoughDecodedAudio()) {
     mMaster->EnsureAudioDecodeTaskQueued();
   }
 
-  if (needToDecodeVideo) {
+  if (mMaster->IsVideoDecoding() &&
+      !mMaster->HaveEnoughDecodedVideo()) {
     mMaster->EnsureVideoDecodeTaskQueued();
   }
 }
 
 void
 MediaDecoderStateMachine::
 BufferingState::Step()
 {