summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorronghuawu@chromium.org <ronghuawu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-03 00:57:30 +0000
committerronghuawu@chromium.org <ronghuawu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-03 00:57:30 +0000
commitfaaefd5b96f481183d938f1615c1768c5b29aca4 (patch)
tree751ad01f9f7598dac292e09a815524ecb6e2de7b /content
parent5aafc8e88a00cd02e517a5c101428887d31b77f5 (diff)
downloadchromium_src-faaefd5b96f481183d938f1615c1768c5b29aca4.zip
chromium_src-faaefd5b96f481183d938f1615c1768c5b29aca4.tar.gz
chromium_src-faaefd5b96f481183d938f1615c1768c5b29aca4.tar.bz2
Use empty string as the mid before it's ready from WebKit. Label is not the correct mid, so we shouldn't use it, otherwise there will be a mismatch of mid and mline_index.
BUG= http://code.google.com/p/webrtc/issues/detail?id=717 TEST=Test page from http://code.google.com/p/webrtc/issues/detail?id=717. Review URL: https://chromiumcodereview.appspot.com/10834137 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149754 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/renderer/media/media_stream_center.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/content/renderer/media/media_stream_center.cc b/content/renderer/media/media_stream_center.cc
index 5c8e656..112f24f 100644
--- a/content/renderer/media/media_stream_center.cc
+++ b/content/renderer/media/media_stream_center.cc
@@ -147,8 +147,10 @@ WebKit::WebString MediaStreamCenter::constructSDP(
LOG(ERROR) << "Invalid candidate label: " << UTF16ToUTF8(candidate.label());
return WebKit::WebString();
}
+ // TODO(ronghuawu): Get sdp_mid from WebKit when is available.
+ const std::string sdp_mid;
scoped_ptr<webrtc::IceCandidateInterface> native_candidate(
- webrtc::CreateIceCandidate(UTF16ToUTF8(candidate.label()),
+ webrtc::CreateIceCandidate(sdp_mid,
m_line_index,
UTF16ToUTF8(candidate.candidateLine())));
std::string sdp;
@@ -172,11 +174,16 @@ WebKit::WebString MediaStreamCenter::constructSDP(
<< UTF16ToUTF8(candidate.label());
continue;
}
+ // TODO(ronghuawu): Get sdp_mid from WebKit when is available.
+ const std::string sdp_mid;
scoped_ptr<webrtc::IceCandidateInterface> native_candidate(
- webrtc::CreateIceCandidate(UTF16ToUTF8(candidate.label()),
+ webrtc::CreateIceCandidate(sdp_mid,
m_line_index,
UTF16ToUTF8(candidate.candidateLine())));
- native_desc->AddCandidate(native_candidate.get());
+ if (!native_desc->AddCandidate(native_candidate.get())) {
+ LOG(ERROR) << "Failed to add candidate to SessionDescription.";
+ continue;
+ }
}
std::string sdp;