Index: webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm |
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm |
index 57c678032a19be0c489a9fad4a00895f9efdbd25..15b34c3f2d3cee7201f32509048cf6ee90f5fb12 100644 |
--- a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm |
+++ b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm |
@@ -198,9 +198,10 @@ void PeerConnectionDelegateAdapter::OnIceCandidate( |
delegate:(id<RTCPeerConnectionDelegate>)delegate { |
NSParameterAssert(factory); |
std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration> config( |
- configuration.nativeConfiguration); |
- if (!config) |
- return nullptr; |
+ [configuration createNativeConfiguration]); |
+ if (!config) { |
+ return nil; |
+ } |
if (self = [super init]) { |
_observer.reset(new webrtc::PeerConnectionDelegateAdapter(self)); |
std::unique_ptr<webrtc::MediaConstraints> nativeConstraints = |
@@ -254,9 +255,10 @@ void PeerConnectionDelegateAdapter::OnIceCandidate( |
- (BOOL)setConfiguration:(RTCConfiguration *)configuration { |
std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration> config( |
- configuration.nativeConfiguration); |
- if (!config) |
- return false; |
+ [configuration createNativeConfiguration]); |
+ if (!config) { |
+ return NO; |
+ } |
return _peerConnection->SetConfiguration(*config); |
} |