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
--- 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);