Bug 1314526. Part 5 - fix HandleWaitingForData(). r=kikuo
authorJW Wang <jwwang@mozilla.com>
Fri, 28 Oct 2016 16:31:54 +0800
changeset 351549 8bda14acdc2227a8431136d80ca2739a2010901f
parent 351548 5b6b44bd04957942b18c80caacd3822630d942a7
child 351550 dbd323ea0320f382ee8be740caaa04c5cba96570
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskikuo
bugs1314526
milestone52.0a1
Bug 1314526. Part 5 - fix HandleWaitingForData(). r=kikuo MozReview-Commit-ID: KHPpdZFt9Tt
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -192,18 +192,17 @@ public:
   virtual void Step() {}   // Perform a 'cycle' of this state object.
   virtual State GetState() const = 0;
 
   // Event handlers for various events.
   virtual void HandleCDMProxyReady() {}
   virtual void HandleAudioDecoded(MediaData* aAudio) {}
   virtual void HandleVideoDecoded(MediaData* aVideo, TimeStamp aDecodeStart) {}
   virtual void HandleEndOfStream() {}
-
-  virtual bool HandleWaitingForData() { return false; }
+  virtual void HandleWaitingForData() {}
 
   virtual RefPtr<MediaDecoder::SeekPromise> HandleSeek(SeekTarget aTarget) = 0;
 
   virtual bool HandleAudioCaptured() { return false; }
 
   virtual RefPtr<ShutdownPromise> HandleShutdown();
 
   virtual void HandleVideoSuspendTimeout() = 0;
@@ -582,20 +581,19 @@ public:
     MaybeStopPrerolling();
     CheckSlowDecoding(aDecodeStart);
   }
 
   RefPtr<MediaDecoder::SeekPromise> HandleSeek(SeekTarget aTarget) override;
 
   void HandleEndOfStream() override;
 
-  bool HandleWaitingForData() override
+  void HandleWaitingForData() override
   {
     MaybeStopPrerolling();
-    return true;
   }
 
   bool HandleAudioCaptured() override
   {
     MaybeStopPrerolling();
     // MediaSink is changed. Schedule Step() to check if we can start playback.
     mMaster->ScheduleStateMachine();
     return true;