Skip to content

Commit

Permalink
Update webrtc.rs
Browse files Browse the repository at this point in the history
Update webrtc.rs
  • Loading branch information
BenLocal committed Sep 2, 2024
1 parent a5e4cd1 commit a5a0a86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/webrtc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub fn rtc_server_start(port: u16) {

/// get answer sdp
/// - return (answer, err)
pub type WebrtcAnswerSdpCallbackFn = Box<dyn FnMut(Option<String>, Option<String>) + 'static>;
pub type WebrtcAnswerSdpCallbackFn = Box<dyn Fn(Option<String>, Option<String>) + 'static>;

pub fn get_answer_sdp(cb: WebrtcAnswerSdpCallbackFn, typ: &str, offer: &str, url: &str) {
let typ = const_str_to_ptr!(typ);
Expand All @@ -32,7 +32,7 @@ extern "C" fn on_webrtc_get_answer_sdp(
answer: *const ::std::os::raw::c_char,
err: *const ::std::os::raw::c_char,
) {
let cb: &mut WebrtcAnswerSdpCallbackFn = unsafe { std::mem::transmute(user_data) };
let cb: &WebrtcAnswerSdpCallbackFn = unsafe { std::mem::transmute(user_data) };
let answer = if answer.is_null() {
None
} else {
Expand Down

0 comments on commit a5a0a86

Please sign in to comment.