Pass tracks to Rust unretained

We always call CFRetain when constructing a track on the Rust side.
This commit is contained in:
Nathan Sobo 2022-10-17 23:56:41 -06:00
parent 59fab0bb2d
commit a42a703b35

View file

@ -15,7 +15,7 @@ class LKRoomDelegate: RoomDelegate {
func room(_ room: Room, participant: RemoteParticipant, didSubscribe publication: RemoteTrackPublication, track: Track) {
if track.kind == .video {
self.onDidSubscribeToRemoteVideoTrack(self.data, participant.identity as CFString, track.id as CFString, Unmanaged.passRetained(track).toOpaque())
self.onDidSubscribeToRemoteVideoTrack(self.data, participant.identity as CFString, track.id as CFString, Unmanaged.passUnretained(track).toOpaque())
}
}