Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: content/renderer/media/webrtc_audio_capturer.cc

Issue 15031003: Fixed the crash when the WebRtcAudioCapturer::|buffer_| is NULL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/webrtc_audio_capturer.h" 5 #include "content/renderer/media/webrtc_audio_capturer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 audio_delay_milliseconds, volume); 372 audio_delay_milliseconds, volume);
373 } 373 }
374 } 374 }
375 375
376 void WebRtcAudioCapturer::OnCaptureError() { 376 void WebRtcAudioCapturer::OnCaptureError() {
377 NOTIMPLEMENTED(); 377 NOTIMPLEMENTED();
378 } 378 }
379 379
380 media::AudioParameters WebRtcAudioCapturer::audio_parameters() const { 380 media::AudioParameters WebRtcAudioCapturer::audio_parameters() const {
381 base::AutoLock auto_lock(lock_); 381 base::AutoLock auto_lock(lock_);
382 return buffer_->params(); 382 return buffer_.get() ? buffer_->params() : media::AudioParameters();
henrika (OOO until Aug 14) 2013/05/07 09:13:27 Add comment about why this can happen and what the
no longer working on chromium 2013/05/07 09:21:48 Done.
383 } 383 }
384 384
385 } // namespace content 385 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/webrtc_local_audio_track.cc » ('j') | content/renderer/media/webrtc_local_audio_track.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698