summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'content/renderer')
-rw-r--r--content/renderer/media/media_stream_impl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/content/renderer/media/media_stream_impl.cc b/content/renderer/media/media_stream_impl.cc
index b7a935c..174bb25 100644
--- a/content/renderer/media/media_stream_impl.cc
+++ b/content/renderer/media/media_stream_impl.cc
@@ -602,6 +602,12 @@ MediaStreamImpl::CreateLocalAudioRenderer(int session_id) {
// Ensure that the existing capturer reads data from the selected microphone.
scoped_refptr<WebRtcAudioCapturer> source =
dependency_factory_->GetWebRtcAudioDevice()->capturer();
+ if (!source) {
+ // The WebRtcAudioCapturer instance can be NULL e.g. if an unsupported
+ // sample rate is used.
+ // TODO(henrika): extend support of capture sample rates.
+ return NULL;
+ }
source->SetDevice(session_id);
// Create a new WebRtcLocalAudioRenderer instance and connect it to the