mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-23 02:26:35 +00:00
webrtcsink: fix panic on pre-bwe request error
We dispose of consumer pipelines asynchronously, potentially after the session objects have been disposed of. As session objects are the owner of the cc element, it is entirely possible for the bwe-request signal to get emitted after cc has been disposed of, as the closure only takes a weak reference to it. Fix by simply checking if cc is None Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1044>
This commit is contained in:
parent
0201f5a456
commit
1a8abde884
1 changed files with 17 additions and 17 deletions
|
@ -1443,8 +1443,7 @@ impl WebRTCSink {
|
|||
false,
|
||||
glib::closure!(@watch element, @strong session_id, @weak-allow-none cc
|
||||
=> move |_webrtcbin: gst::Element, _transport: gst::Object| {
|
||||
|
||||
let cc = cc.unwrap();
|
||||
if let Some(ref cc) = cc {
|
||||
let settings = element.imp().settings.lock().unwrap();
|
||||
|
||||
// TODO: Bind properties with @element's
|
||||
|
@ -1461,8 +1460,9 @@ impl WebRTCSink {
|
|||
bwe.property::<u32>(pspec.name()));
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
Some(cc)
|
||||
cc
|
||||
}),
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue