Bug 1299064. Part 2 - remove the if/else statement at the end of SeekCompleted(). draft
authorJW Wang <jwwang@mozilla.com>
Tue, 30 Aug 2016 15:06:56 +0800
changeset 407873 dc73b6ec26383cc85e5584fd914381c274116c52
parent 407872 26d89928a634a486b5c968f68f623e4869cd1813
child 407874 e4018097fe178a252e46a7a1787283ed7859f2a0
push id28067
push userjwwang@mozilla.com
push dateWed, 31 Aug 2016 05:18:30 +0000
bugs1299064
milestone51.0a1
Bug 1299064. Part 2 - remove the if/else statement at the end of SeekCompleted(). |SetState(nextState)| is the equivalent of the if/else. MozReview-Commit-ID: 51ab4BBdd4T
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2192,22 +2192,17 @@ MediaDecoderStateMachine::SeekCompleted(
   // if we need to buffer after the seek.
   mQuickBuffering = false;
 
   if (video) {
     mMediaSink->Redraw(mInfo.mVideo);
     mOnPlaybackEvent.Notify(MediaEventType::Invalidate);
   }
 
-  if (nextState == DECODER_STATE_DECODING) {
-    SetState(DECODER_STATE_DECODING);
-  } else {
-    SetState(nextState);
-  }
-
+  SetState(nextState);
   ScheduleStateMachine();
 }
 
 RefPtr<ShutdownPromise>
 MediaDecoderStateMachine::BeginShutdown()
 {
   return InvokeAsync(OwnerThread(), this, __func__,
                      &MediaDecoderStateMachine::Shutdown);