diff --git a/Cargo.lock b/Cargo.lock index 3434c424..1ebb0b19 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1070,7 +1070,7 @@ dependencies = [ [[package]] name = "livekit-ffi" -version = "0.3.13" +version = "0.3.14" dependencies = [ "console-subscriber", "dashmap", diff --git a/livekit-ffi/src/server/audio_stream.rs b/livekit-ffi/src/server/audio_stream.rs index 1f8bc43f..2d07e6f9 100644 --- a/livekit-ffi/src/server/audio_stream.rs +++ b/livekit-ffi/src/server/audio_stream.rs @@ -43,7 +43,9 @@ impl FfiAudioStream { server: &'static server::FfiServer, new_stream: proto::NewAudioStreamRequest, ) -> FfiResult { - let ffi_track = server.retrieve_handle::(new_stream.track_handle)?; + let ffi_track = server + .retrieve_handle::(new_stream.track_handle)? + .clone(); let rtc_track = ffi_track.track.rtc_track(); let MediaStreamTrack::Audio(rtc_track) = rtc_track else { diff --git a/livekit-ffi/src/server/video_stream.rs b/livekit-ffi/src/server/video_stream.rs index 2bde3aeb..8a4c3b4e 100644 --- a/livekit-ffi/src/server/video_stream.rs +++ b/livekit-ffi/src/server/video_stream.rs @@ -43,7 +43,9 @@ impl FfiVideoStream { server: &'static server::FfiServer, new_stream: proto::NewVideoStreamRequest, ) -> FfiResult { - let ffi_track = server.retrieve_handle::(new_stream.track_handle)?; + let ffi_track = server + .retrieve_handle::(new_stream.track_handle)? + .clone(); let rtc_track = ffi_track.track.rtc_track(); let MediaStreamTrack::Video(rtc_track) = rtc_track else {