webrtcsink: remove unneeded mut

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1221>
This commit is contained in:
François Laignel 2023-05-17 18:47:54 +02:00
parent b05c21680d
commit b68e2a1ed0

View file

@ -2180,7 +2180,7 @@ impl BaseWebRTCSink {
let element = element.expect("on-new-ssrc emitted when webrtcsink has been disposed?"); let element = element.expect("on-new-ssrc emitted when webrtcsink has been disposed?");
let webrtcbin = webrtcbin.unwrap(); let webrtcbin = webrtcbin.unwrap();
let mut state = element.imp().state.lock().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"), 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| { glib::clone!(@strong session_id_str, @weak webrtcbin, @weak element => @default-panic, move |sess, pspec| {
@ -2431,7 +2431,7 @@ impl BaseWebRTCSink {
stats: &gst::Structure, stats: &gst::Structure,
) { ) {
let mut state = element.imp().state.lock().unwrap(); 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() { if let Some(congestion_controller) = session.congestion_controller.as_mut() {
congestion_controller.loss_control(element, stats, &mut session.encoders); congestion_controller.loss_control(element, stats, &mut session.encoders);
} }
@ -2451,7 +2451,7 @@ impl BaseWebRTCSink {
if let Ok(Some(stats)) = reply { if let Ok(Some(stats)) = reply {
let mut state = element.imp().state.lock().unwrap(); 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() { if let Some(congestion_controller) = session.congestion_controller.as_mut() {
congestion_controller.delay_control(&element, stats, &mut session.encoders,); congestion_controller.delay_control(&element, stats, &mut session.encoders,);
} }