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 369610 2f4a1cea707bd76d8093bf892f48b745074c11a3
parent 369142 9cfb446f8dd432da297641c16d24e8e613dd1fbd
child 369611 57f7bb3d9ac411e0408b4640a87250ad92c0ea6d
push id18864
push userbmo:jyavenard@mozilla.com
push dateMon, 23 May 2016 07:35:24 +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();
 }