Bug 1260702: Don't crash on input sources from WebAudio in MediaRecorder r=padenot
authorRandell Jesup <rjesup@jesup.org>
Wed, 30 Mar 2016 10:08:04 -0400
changeset 291013 1fd5dcb62bc4be26d7de019bb978fd7970953f9b
parent 291012 dc32b86990d5142169d46d9b1ac75c780d99442c
child 291014 57a583c7c3107d396c1c5a51bc7a248c452f21a7
push id30128
push userkwierso@gmail.com
push dateThu, 31 Mar 2016 20:04:34 +0000
treeherdermozilla-central@bccb11375f2a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1260702
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1260702: Don't crash on input sources from WebAudio in MediaRecorder r=padenot MozReview-Commit-ID: cseol6STUw
dom/media/MediaRecorder.cpp
--- a/dom/media/MediaRecorder.cpp
+++ b/dom/media/MediaRecorder.cpp
@@ -638,17 +638,17 @@ private:
     if (!mTrackUnionStream) {
       LOG(LogLevel::Debug, ("Session.InitEncoder !mTrackUnionStream %p", this));
       DoSessionEndTask(NS_OK);
       return;
     }
     mTrackUnionStream->AddListener(mEncoder);
     // Try to use direct listeners if possible
     DOMMediaStream* domStream = mRecorder->Stream();
-    if (domStream) {
+    if (domStream && domStream->GetInputStream()) {
       mInputStream = domStream->GetInputStream()->AsSourceStream();
       if (mInputStream) {
         mInputStream->AddDirectListener(mEncoder);
         mEncoder->SetDirectConnect(true);
       }
     }
 
     // Create a thread to read encode media data from MediaEncoder.