From b68e2a1ed0d0f2ae4d5cbea5f6dae2bcabdb03a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Wed, 17 May 2023 18:47:54 +0200 Subject: [PATCH] webrtcsink: remove unneeded mut Part-of: --- net/webrtc/src/webrtcsink/imp.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/webrtc/src/webrtcsink/imp.rs b/net/webrtc/src/webrtcsink/imp.rs index 5e5a8c89..1be780d9 100644 --- a/net/webrtc/src/webrtcsink/imp.rs +++ b/net/webrtc/src/webrtcsink/imp.rs @@ -2180,7 +2180,7 @@ impl BaseWebRTCSink { let element = element.expect("on-new-ssrc emitted when webrtcsink has been disposed?"); let webrtcbin = webrtcbin.unwrap(); let mut state = element.imp().state.lock().unwrap(); - if let Some(mut session) = state.sessions.get_mut(&session_id_str) { + if let Some(session) = state.sessions.get_mut(&session_id_str) { session.stats_sigid = Some(rtp_session.connect_notify(Some("twcc-stats"), glib::clone!(@strong session_id_str, @weak webrtcbin, @weak element => @default-panic, move |sess, pspec| { @@ -2431,7 +2431,7 @@ impl BaseWebRTCSink { stats: &gst::Structure, ) { let mut state = element.imp().state.lock().unwrap(); - if let Some(mut session) = state.sessions.get_mut(session_id) { + if let Some(session) = state.sessions.get_mut(session_id) { if let Some(congestion_controller) = session.congestion_controller.as_mut() { congestion_controller.loss_control(element, stats, &mut session.encoders); } @@ -2451,7 +2451,7 @@ impl BaseWebRTCSink { if let Ok(Some(stats)) = reply { let mut state = element.imp().state.lock().unwrap(); - if let Some(mut session) = state.sessions.get_mut(&session_id) { + if let Some(session) = state.sessions.get_mut(&session_id) { if let Some(congestion_controller) = session.congestion_controller.as_mut() { congestion_controller.delay_control(&element, stats, &mut session.encoders,); }