mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-28 22:41:02 +00:00
webrtcsink: Refactor value retrieval to avoid lock poisoning
When setting an incorrect property name in settings, start_stream_discovery_if_needed would panic because it attempts to unwrap a poisoned lock for settings. This refactor avoids that situation. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1598>
This commit is contained in:
parent
3cdb350626
commit
205cc10e6e
1 changed files with 2 additions and 2 deletions
|
@ -4113,8 +4113,8 @@ impl ObjectImpl for BaseWebRTCSink {
|
|||
);
|
||||
|
||||
let this = element.imp();
|
||||
let settings = this.settings.lock().unwrap();
|
||||
configure_encoder(&enc, settings.cc_info.start_bitrate);
|
||||
let start_bitrate = this.settings.lock().unwrap().cc_info.start_bitrate;
|
||||
configure_encoder(&enc, start_bitrate);
|
||||
|
||||
// Return false here so that latter handlers get called
|
||||
Some(false.to_value())
|
||||
|
|
Loading…
Reference in a new issue