Bug 1223655 - Only check for track end if track exists in MediaEngineDefaultAudioSource. r=jesup
authorAndreas Pehrson <pehrsons@gmail.com>
Wed, 11 Nov 2015 12:18:51 +0800
changeset 308247 b01d694885ed92c44ac5538d608c46c9945d89e1
parent 308209 e72c6539d6b563f5b6ab4be132af1b4a82ca1af9
child 308248 ff51cadae5bf82a023ac3f153ee424cd445853a7
push id7450
push userahalberstadt@mozilla.com
push dateWed, 11 Nov 2015 20:09:05 +0000
reviewersjesup
bugs1223655
milestone45.0a1
Bug 1223655 - Only check for track end if track exists in MediaEngineDefaultAudioSource. r=jesup
dom/media/webrtc/MediaEngineDefault.h
--- a/dom/media/webrtc/MediaEngineDefault.h
+++ b/dom/media/webrtc/MediaEngineDefault.h
@@ -131,17 +131,18 @@ public:
                           bool aNoiseOn, uint32_t aNoise,
                           int32_t aPlayoutDelay) override { return NS_OK; };
   void AppendToSegment(AudioSegment& aSegment, TrackTicks aSamples);
   virtual void NotifyPull(MediaStreamGraph* aGraph,
                           SourceMediaStream *aSource,
                           TrackID aId,
                           StreamTime aDesiredTime) override
   {
-    NS_WARN_IF_FALSE(aDesiredTime <= aSource->GetEndOfAppendedData(aId),
+    NS_WARN_IF_FALSE(!aSource->FindTrack(aId) ||
+                     aDesiredTime <= aSource->GetEndOfAppendedData(aId),
                      "MediaEngineDefaultAudioSource data underrun");
   }
 
   virtual bool IsFake() override {
     return true;
   }
 
   virtual const dom::MediaSourceEnum GetMediaSource() override {