Bug 1359058: P1. handle EOS during seeking. r=jya
authorJW Wang <jwwang@mozilla.com>
Wed, 26 Apr 2017 11:32:50 +0800
changeset 409051 0cf76b87767d2c47eaff9a0a9c10896e9b20f890
parent 409050 9494a5b0b185cc35bcdd6cd822c60e1c609d5d50
child 409052 40d98a26598ec6e16e5f93cfd91e3dab28956e59
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1359058
milestone55.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 1359058: P1. handle EOS during seeking. r=jya MozReview-Commit-ID: DPT3t1pi6o1
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1306,16 +1306,22 @@ private:
                  SLOG("OnSeekRejected wait promise rejected");
                  mWaitRequest.Complete();
                  mMaster->DecodeError(NS_ERROR_DOM_MEDIA_WAITING_FOR_DATA);
                })
         ->Track(mWaitRequest);
       return;
     }
 
+    if (aReject.mError == NS_ERROR_DOM_MEDIA_END_OF_STREAM) {
+      HandleEndOfAudio();
+      HandleEndOfVideo();
+      return;
+    }
+
     MOZ_ASSERT(NS_FAILED(aReject.mError),
                "Cancels should also disconnect mSeekRequest");
     mMaster->DecodeError(aReject.mError);
   }
 
   void RequestAudioData()
   {
     MOZ_ASSERT(!mDoneAudioSeeking);