From a42a703b35caa7a132beefdf8306bbc6efa28bf3 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 17 Oct 2022 23:56:41 -0600 Subject: [PATCH] Pass tracks to Rust unretained We always call CFRetain when constructing a track on the Rust side. --- .../LiveKitBridge/Sources/LiveKitBridge/LiveKitBridge.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/live_kit_client/LiveKitBridge/Sources/LiveKitBridge/LiveKitBridge.swift b/crates/live_kit_client/LiveKitBridge/Sources/LiveKitBridge/LiveKitBridge.swift index 109b9fb84a..80032752a9 100644 --- a/crates/live_kit_client/LiveKitBridge/Sources/LiveKitBridge/LiveKitBridge.swift +++ b/crates/live_kit_client/LiveKitBridge/Sources/LiveKitBridge/LiveKitBridge.swift @@ -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()) } }