Bug 1274892: [MSE] Don't crash when source buffer is deleted early. r?cpearce draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 23 May 2016 14:03:43 +1000
changeset 369993 9dd93abb980b932e812e8d3770461d4e114b2c10
parent 369992 d95dfde58be4f346b3edce8f8075e1a478ba9081
child 369994 b07bda8ddea67518f919d3bbe82694943dfef28a
push id18971
push userbmo:jyavenard@mozilla.com
push dateTue, 24 May 2016 03:18:45 +0000
reviewerscpearce
bugs1274892
milestone49.0a1
Bug 1274892: [MSE] Don't crash when source buffer is deleted early. r?cpearce The condition will be perfectly handled by the MediaFormatReader anyway. MozReview-Commit-ID: Dm6evq6T4t6
dom/media/mediasource/MediaSourceDemuxer.cpp
--- a/dom/media/mediasource/MediaSourceDemuxer.cpp
+++ b/dom/media/mediasource/MediaSourceDemuxer.cpp
@@ -144,17 +144,16 @@ MediaSourceDemuxer::GetNumberTracks(Trac
   return HasTrackType(aType) ? 1u : 0;
 }
 
 already_AddRefed<MediaTrackDemuxer>
 MediaSourceDemuxer::GetTrackDemuxer(TrackType aType, uint32_t aTrackNumber)
 {
   RefPtr<TrackBuffersManager> manager = GetManager(aType);
   if (!manager) {
-    MOZ_CRASH("TODO: sourcebuffer was deleted from under us");
     return nullptr;
   }
   RefPtr<MediaSourceTrackDemuxer> e =
     new MediaSourceTrackDemuxer(this, aType, manager);
   mDemuxers.AppendElement(e);
   return e.forget();
 }