Fixed crash when PCF is destroyed before MediaSource/Track in ObjC

Bug: webrtc:9231
Change-Id: I31b86aa560f4ad230c9a94fedebebf320e0370a4
Reviewed-on: https://webrtc-review.googlesource.com/88221
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23981}
This commit is contained in:
Yura Yaroshevich
2018-07-11 15:35:40 +03:00
committed by Commit Bot
parent 5a3d87d122
commit 01cee079dc
15 changed files with 180 additions and 76 deletions

View File

@ -180,7 +180,7 @@
rtc::scoped_refptr<webrtc::AudioSourceInterface> source =
_nativeFactory->CreateAudioSource(options);
return [[RTCAudioSource alloc] initWithNativeAudioSource:source];
return [[RTCAudioSource alloc] initWithFactory:self nativeAudioSource:source];
}
- (RTCAudioTrack *)audioTrackWithTrackId:(NSString *)trackId {
@ -196,8 +196,9 @@
}
- (RTCVideoSource *)videoSource {
return [[RTCVideoSource alloc] initWithSignalingThread:_signalingThread.get()
workerThread:_workerThread.get()];
return [[RTCVideoSource alloc] initWithFactory:self
signalingThread:_signalingThread.get()
workerThread:_workerThread.get()];
}
- (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source