Chromium Code Reviews| Index: content/renderer/media/media_stream_impl.cc |
| diff --git a/content/renderer/media/media_stream_impl.cc b/content/renderer/media/media_stream_impl.cc |
| index f659aaf9c93188385bbe257acea278284f1033cc..4a086bfc7bf19771c28862ffc0e67e7e4deb2e2c 100644 |
| --- a/content/renderer/media/media_stream_impl.cc |
| +++ b/content/renderer/media/media_stream_impl.cc |
| @@ -730,6 +730,13 @@ void MediaStreamImpl::StopLocalSource( |
| if (source.type() == blink::WebMediaStreamSource::TypeAudio) { |
| if (extra_data->GetAudioCapturer()) { |
| extra_data->GetAudioCapturer()->Stop(); |
| + |
| + // Remove the capturer object from the WebRtcAudioDeviceImpl after it |
| + // stops. |
| + WebRtcAudioDeviceImpl* audio_device = |
|
perkj_chrome
2014/01/14 08:42:40
What is the lifetime of audio_device? How about le
no longer working on chromium
2014/01/14 11:10:21
Sorry, I just forgot the save the change in this f
|
| + dependency_factory_->GetWebRtcAudioDevice(); |
| + if (audio_device) |
| + audio_device->RemoveAudioCapturer(extra_data->GetAudioCapturer()); |
| } |
| } |
| @@ -801,19 +808,13 @@ bool MediaStreamImpl::GetAuthorizedDeviceInfoForAudioRenderer( |
| int* output_sample_rate, |
| int* output_frames_per_buffer) { |
| DCHECK(CalledOnValidThread()); |
| - |
| WebRtcAudioDeviceImpl* audio_device = |
| dependency_factory_->GetWebRtcAudioDevice(); |
| if (!audio_device) |
| return false; |
| - if (!audio_device->GetDefaultCapturer()) |
| - return false; |
| - |
| - return audio_device->GetDefaultCapturer()->GetPairedOutputParameters( |
| - session_id, |
| - output_sample_rate, |
| - output_frames_per_buffer); |
| + return audio_device->GetAuthorizedDeviceInfoForAudioRenderer( |
| + session_id, output_sample_rate, output_frames_per_buffer); |
| } |
| MediaStreamSourceExtraData::MediaStreamSourceExtraData( |