Use empty string as the mid before it's ready from WebKit. Label is not the...

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
parent 5aafc8e8
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment