Chromium Code Reviews| Index: content/renderer/media/media_stream_center.cc |
| =================================================================== |
| --- content/renderer/media/media_stream_center.cc (revision 149634) |
| +++ content/renderer/media/media_stream_center.cc (working copy) |
| @@ -147,8 +147,10 @@ |
| 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 = ""; |
|
wjia(left Chromium)
2012/08/02 22:09:20
std::string's default ctor make it an empty string
Ronghua Wu (Left Chromium)
2012/08/02 22:14:48
Was thinking maybe it's easier to read - people wo
|
| 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 @@ |
| << UTF16ToUTF8(candidate.label()); |
| continue; |
| } |
| + // TODO(ronghuawu): Get sdp_mid from WebKit when is available. |
| + const std::string sdp_mid = ""; |
|
wjia(left Chromium)
2012/08/02 22:09:20
ditto.
Ronghua Wu (Left Chromium)
2012/08/02 22:14:48
Done.
|
| 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; |