mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-16 21:05:15 +00:00
net/webrtc: src: don't set stun-server on webrtcbin when our property is None
... otherwise an error occurs about the stun-server address being an empty string which doesn't comply with the expected address format. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1202>
This commit is contained in:
parent
de1c8ece43
commit
eca269cbf2
1 changed files with 4 additions and 4 deletions
|
@ -458,13 +458,13 @@ impl WebRTCSrc {
|
|||
fn prepare(&self) -> Result<(), Error> {
|
||||
let webrtcbin = gst::ElementFactory::make("webrtcbin")
|
||||
.property("bundle-policy", gst_webrtc::WebRTCBundlePolicy::MaxBundle)
|
||||
.property(
|
||||
"stun-server",
|
||||
&self.settings.lock().unwrap().stun_server.to_value(),
|
||||
)
|
||||
.build()
|
||||
.with_context(|| "Failed to make element webrtcbin".to_string())?;
|
||||
|
||||
if let Some(stun_server) = self.settings.lock().unwrap().stun_server.as_ref() {
|
||||
webrtcbin.set_property("stun-server", stun_server);
|
||||
}
|
||||
|
||||
let bin = gst::Bin::new(None);
|
||||
bin.connect_pad_removed(glib::clone!(@weak self as this => move |_, pad|
|
||||
this.state.lock().unwrap().flow_combiner.remove_pad(pad);
|
||||
|
|
Loading…
Reference in a new issue