From 3c16978c8489e77d49932ab4b5af720fe427e544 Mon Sep 17 00:00:00 2001 From: Tommi Date: Thu, 21 Jan 2016 16:12:17 +0100 Subject: [PATCH] Remove cast to LocalAudioSource from AudioRtpSender. We can't assume that the audio source implementation will be our own internal one and we shouldn't apply local audio options to a remote audio track this way either. BUG=5423 R=solenberg@webrtc.org Review URL: https://codereview.webrtc.org/1576913002 . Cr-Commit-Position: refs/heads/master@{#11341} --- talk/app/webrtc/rtpsender.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/talk/app/webrtc/rtpsender.cc b/talk/app/webrtc/rtpsender.cc index 72a9114eb4..e37c5f84c4 100644 --- a/talk/app/webrtc/rtpsender.cc +++ b/talk/app/webrtc/rtpsender.cc @@ -199,12 +199,17 @@ void AudioRtpSender::Stop() { void AudioRtpSender::SetAudioSend() { RTC_DCHECK(!stopped_ && can_send_track()); cricket::AudioOptions options; +#if !defined(WEBRTC_CHROMIUM_BUILD) + // TODO(tommi): Remove this hack when we move CreateAudioSource out of + // PeerConnection. This is a bit of a strange way to apply local audio + // options since it is also applied to all streams/channels, local or remote. if (track_->enabled() && track_->GetSource() && !track_->GetSource()->remote()) { // TODO(xians): Remove this static_cast since we should be able to connect // a remote audio track to a peer connection. options = static_cast(track_->GetSource())->options(); } +#endif // Use the renderer if the audio track has one, otherwise use the sink // adapter owned by this class.