Bug 1365190 P2 - don't assert NeedMoreVideo() in audio events; r?jwwang draft
authorKaku Kuo <kaku@mozilla.com>
Thu, 25 May 2017 14:03:39 +0800
changeset 584343 a92adcc3f5afd50f83eca34257151722f4d26ef1
parent 584342 9eba20b237515c269071a326d1f59490e1b7b76c
child 584344 1b4968125d4a11514e5ba5db0840f06385d239a4
child 584846 bb135fd69bbd98cad7b9b131cb803e26df69bcac
push id60698
push userbmo:kaku@mozilla.com
push dateThu, 25 May 2017 09:22:08 +0000
reviewersjwwang
bugs1365190
milestone55.0a1
Bug 1365190 P2 - don't assert NeedMoreVideo() in audio events; r?jwwang The assertion fails if we call SeekToNextFrame() on a video which has done video decoding but keeps decoding audio. MozReview-Commit-ID: F9qpfYI2Ajo
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1542,33 +1542,30 @@ public:
     } else {
       RequestVideoData();
     }
   }
 
   void HandleWaitingForAudio() override
   {
     MOZ_ASSERT(!mSeekJob.mPromise.IsEmpty(), "Seek shouldn't be finished");
-    MOZ_ASSERT(NeedMoreVideo());
     // We don't care about audio decode errors in this state which will be
     // handled by other states after seeking.
   }
 
   void HandleAudioCanceled() override
   {
     MOZ_ASSERT(!mSeekJob.mPromise.IsEmpty(), "Seek shouldn't be finished");
-    MOZ_ASSERT(NeedMoreVideo());
     // We don't care about audio decode errors in this state which will be
     // handled by other states after seeking.
   }
 
   void HandleEndOfAudio() override
   {
     MOZ_ASSERT(!mSeekJob.mPromise.IsEmpty(), "Seek shouldn't be finished");
-    MOZ_ASSERT(NeedMoreVideo());
     // We don't care about audio decode errors in this state which will be
     // handled by other states after seeking.
   }
 
   void HandleWaitingForVideo() override
   {
     MOZ_ASSERT(!mSeekJob.mPromise.IsEmpty(), "Seek shouldn't be finished");
     MOZ_ASSERT(NeedMoreVideo());