aboutsummaryrefslogtreecommitdiff
path: root/talk/session/media/mediasession.cc
diff options
context:
space:
mode:
authortommi@webrtc.org <tommi@webrtc.org>2014-10-27 22:15:04 +0000
committertommi@webrtc.org <tommi@webrtc.org>2014-10-27 22:15:04 +0000
commitf15dee6980152cded2f10c26748d7d88ab9501ae (patch)
treebe99d1be66ce0cf9e1f89f283481860e6f012266 /talk/session/media/mediasession.cc
parentaada86b261146336d74ea09acedaf40e5c2f4618 (diff)
downloadwebrtc-f15dee6980152cded2f10c26748d7d88ab9501ae.tar.gz
Check if a datachannel in the current local description is an sctp channel before assuming rtp.
When generating an offer from a local description when 'sctp' is not explicitly set in the media session options, we were generating an offer with an RTP datachannel even though the channel in the local description was already sctp. R=pthatcher@webrtc.org Review URL: https://webrtc-codereview.appspot.com/28819004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7539 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'talk/session/media/mediasession.cc')
-rw-r--r--talk/session/media/mediasession.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/talk/session/media/mediasession.cc b/talk/session/media/mediasession.cc
index 54eeffa600..79fc15144e 100644
--- a/talk/session/media/mediasession.cc
+++ b/talk/session/media/mediasession.cc
@@ -1191,8 +1191,14 @@ SessionDescription* MediaSessionDescriptionFactory::CreateOffer(
}
video_added = true;
} else if (IsMediaContentOfType(&*it, MEDIA_TYPE_DATA)) {
- if (!AddDataContentForOffer(options, current_description, &data_codecs,
- &current_streams, offer.get())) {
+ MediaSessionOptions options_copy(options);
+ if (IsSctp(static_cast<const MediaContentDescription*>(
+ it->description))) {
+ options_copy.data_channel_type = DCT_SCTP;
+ }
+ if (!AddDataContentForOffer(options_copy, current_description,
+ &data_codecs, &current_streams,
+ offer.get())) {
return NULL;
}
data_added = true;