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

Unified Diff: webrtc/api/peerconnection.cc

Issue 2473603002: Fix the issue of setting local description with datachannel only and max-bundle. (Closed)
Patch Set: Fix the issues when setting local description with datachannel only Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/api/peerconnection_unittest.cc » ('j') | webrtc/api/peerconnection_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnection.cc
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
index 830c301a6d9cf0090870e3a06bca4ce23835ec0c..34beeffa7c152f78fce1486abd4c9f0b31647f3f 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -1643,10 +1643,6 @@ bool PeerConnection::GetOptionsForOffer(
session_options->HasSendMediaStream(cricket::MEDIA_TYPE_VIDEO) ||
!remote_video_tracks_.empty();
}
- session_options->bundle_enabled =
- session_options->bundle_enabled &&
- (session_options->has_audio() || session_options->has_video() ||
- session_options->has_data());
// Intentionally unset the data channel type for RTP data channel with the
// second condition. Otherwise the RTP data channels would be successfully
@@ -1657,6 +1653,11 @@ bool PeerConnection::GetOptionsForOffer(
session_options->data_channel_type = session_->data_channel_type();
}
+ session_options->bundle_enabled =
+ session_options->bundle_enabled &&
+ (session_options->has_audio() || session_options->has_video() ||
+ session_options->has_data());
+
session_options->rtcp_cname = rtcp_cname_;
session_options->crypto_options = factory_->options().crypto_options;
return true;
@@ -1682,11 +1683,6 @@ void PeerConnection::FinishOptionsForAnswer(
}
}
AddSendStreams(session_options, senders_, rtp_data_channels_);
- session_options->bundle_enabled =
- session_options->bundle_enabled &&
- (session_options->has_audio() || session_options->has_video() ||
- session_options->has_data());
-
// RTP data channel is handled in MediaSessionOptions::AddStream. SCTP streams
// are not signaled in the SDP so does not go through that path and must be
// handled here.
@@ -1697,6 +1693,11 @@ void PeerConnection::FinishOptionsForAnswer(
if (session_->data_channel_type() != cricket::DCT_RTP) {
session_options->data_channel_type = session_->data_channel_type();
}
+ session_options->bundle_enabled =
+ session_options->bundle_enabled &&
+ (session_options->has_audio() || session_options->has_video() ||
+ session_options->has_data());
+
session_options->crypto_options = factory_->options().crypto_options;
}
« no previous file with comments | « no previous file | webrtc/api/peerconnection_unittest.cc » ('j') | webrtc/api/peerconnection_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698