Index: content/renderer/media/webrtc_local_audio_track.cc |
diff --git a/content/renderer/media/webrtc_local_audio_track.cc b/content/renderer/media/webrtc_local_audio_track.cc |
index b277cad994288bfbb538d29dd41ffeba4ef21abe..398d8bd1544c2c836242eeaa4327c3701288b63b 100644 |
--- a/content/renderer/media/webrtc_local_audio_track.cc |
+++ b/content/renderer/media/webrtc_local_audio_track.cc |
@@ -30,7 +30,6 @@ WebRtcLocalAudioTrack::WebRtcLocalAudioTrack( |
track_source_(track_source) { |
DCHECK(capturer); |
capturer_->AddSink(this); |
- params_ = capturer_->audio_parameters(); |
DVLOG(1) << "WebRtcLocalAudioTrack::WebRtcLocalAudioTrack()"; |
} |
@@ -72,6 +71,11 @@ void WebRtcLocalAudioTrack::SetCaptureFormat( |
const media::AudioParameters& params) { |
base::AutoLock auto_lock(lock_); |
params_ = params; |
+ |
+ // Update all the existing sinks with the new format. |
+ for (SinkList::const_iterator it = sinks_.begin(); |
+ it != sinks_.end(); ++it) |
+ (*it)->SetCaptureFormat(params); |
} |
// webrtc::AudioTrackInterface implementation. |