Fixed crash when PCF is destroyed before RTCRtpTranceiver in ObjC

Bug: webrtc:9231
Change-Id: Icecc319eaf6edd2c4b7b05fda984660412cb0d40
Reviewed-on: https://webrtc-review.googlesource.com/87439
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23884}
This commit is contained in:
Yura Yaroshevich
2018-07-09 11:56:06 +03:00
committed by Commit Bot
parent 42a2fc9cba
commit 08f14dd388
4 changed files with 49 additions and 12 deletions

View File

@ -14,6 +14,8 @@
NS_ASSUME_NONNULL_BEGIN
@class RTCPeerConnectionFactory;
@interface RTCRtpTransceiverInit ()
@property(nonatomic, readonly) webrtc::RtpTransceiverInit nativeInit;
@ -26,8 +28,9 @@ NS_ASSUME_NONNULL_BEGIN
nativeRtpTransceiver;
/** Initialize an RTCRtpTransceiver with a native RtpTransceiverInterface. */
- (instancetype)initWithNativeRtpTransceiver:
(rtc::scoped_refptr<webrtc::RtpTransceiverInterface>)nativeRtpTransceiver
- (instancetype)initWithFactory:(RTCPeerConnectionFactory*)factory
nativeRtpTransceiver:
(rtc::scoped_refptr<webrtc::RtpTransceiverInterface>)nativeRtpTransceiver
NS_DESIGNATED_INITIALIZER;
+ (webrtc::RtpTransceiverDirection)nativeRtpTransceiverDirectionFromDirection: