Index: webrtc/api/objc/RTCPeerConnection.mm |
diff --git a/webrtc/api/objc/RTCPeerConnection.mm b/webrtc/api/objc/RTCPeerConnection.mm |
index f75d6636fa8b81e87d431f8bab01c022d9bc493e..35ac07aeb78582e7f27102429ca690334b153533 100644 |
--- a/webrtc/api/objc/RTCPeerConnection.mm |
+++ b/webrtc/api/objc/RTCPeerConnection.mm |
@@ -199,11 +199,11 @@ void PeerConnectionDelegateAdapter::OnIceCandidate( |
_observer.reset(new webrtc::PeerConnectionDelegateAdapter(self)); |
webrtc::PeerConnectionInterface::RTCConfiguration config = |
configuration.nativeConfiguration; |
- webrtc::MediaConstraints *nativeConstraints = |
- constraints.nativeConstraints.get(); |
+ rtc::scoped_ptr<webrtc::MediaConstraints> nativeConstraints = |
+ constraints.nativeConstraints; |
_peerConnection = |
factory.nativeFactory->CreatePeerConnection(config, |
- nativeConstraints, |
+ nativeConstraints.get(), |
tkchin_webrtc
2016/02/20 00:17:31
get or release?
hjon_webrtc
2016/02/22 23:03:06
If I'm thinking about this correctly (and correctl
tkchin_webrtc
2016/02/23 00:22:26
Ok.
|
nullptr, |
nullptr, |
_observer.get()); |
@@ -259,7 +259,7 @@ void PeerConnectionDelegateAdapter::OnIceCandidate( |
} |
- (void)addStream:(RTCMediaStream *)stream { |
- if (_peerConnection->AddStream(stream.nativeMediaStream)) { |
+ if (!_peerConnection->AddStream(stream.nativeMediaStream)) { |
RTCLogError(@"Failed to add stream: %@", stream); |
return; |
} |