Use the sanitized pair when surfacing the candidate pair change event.
TBR=andersc@webrtc.org Bug: None Change-Id: Ie2c389fe966dada2768e3222e1f8da74e1715568 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150762 Commit-Queue: Qingsi Wang <qingsi@webrtc.org> Reviewed-by: Alex Drake <alexdrake@webrtc.org> Reviewed-by: Alex Glaznev <glaznev@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29052}
This commit is contained in:
@ -235,14 +235,15 @@ void PeerConnectionDelegateAdapter::OnIceCandidatesRemoved(
|
||||
|
||||
void PeerConnectionDelegateAdapter::OnIceSelectedCandidatePairChanged(
|
||||
const cricket::CandidatePairChangeEvent &event) {
|
||||
std::unique_ptr<JsepIceCandidate> local_candidate_wrapper(
|
||||
new JsepIceCandidate(event.local_candidate.transport_name(), -1, event.local_candidate));
|
||||
const auto &selected_pair = event.selected_candidate_pair;
|
||||
auto local_candidate_wrapper = absl::make_unique<JsepIceCandidate>(
|
||||
selected_pair.local_candidate().transport_name(), -1, selected_pair.local_candidate());
|
||||
RTCIceCandidate *local_candidate =
|
||||
[[RTCIceCandidate alloc] initWithNativeCandidate:local_candidate_wrapper.get()];
|
||||
std::unique_ptr<JsepIceCandidate> remote_candidate_wrapper(
|
||||
new JsepIceCandidate(event.remote_candidate.transport_name(), -1, event.remote_candidate));
|
||||
[[RTCIceCandidate alloc] initWithNativeCandidate:local_candidate_wrapper.release()];
|
||||
auto remote_candidate_wrapper = absl::make_unique<JsepIceCandidate>(
|
||||
selected_pair.remote_candidate().transport_name(), -1, selected_pair.remote_candidate());
|
||||
RTCIceCandidate *remote_candidate =
|
||||
[[RTCIceCandidate alloc] initWithNativeCandidate:remote_candidate_wrapper.get()];
|
||||
[[RTCIceCandidate alloc] initWithNativeCandidate:remote_candidate_wrapper.release()];
|
||||
RTCPeerConnection *peer_connection = peer_connection_;
|
||||
NSString *nsstr_reason = [NSString stringForStdString:event.reason];
|
||||
if ([peer_connection.delegate
|
||||
|
||||
Reference in New Issue
Block a user