Segfault when panicking in on-new-transceiver
webrtcbin
.connect("on-new-transceiver", false, |values| {
values[1]
.get::<gst::glib::Object>()
.unwrap()
.unwrap()
.set_property(
"codec_preferences",
&gst::Caps::new_simple("application/x-rtp", &[("encoding-name", &"H264")]),
)
.unwrap();
None
})
.unwrap();
This panics (because no codec_preferences
property, which I do not understand either to be honest), but besides that also segfaults the whole app, which is not expected:
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: BoolError { message: "property not found", filename: "/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.9.3/src/object.rs", function: "glib::object", line: 1373 }', ...:530:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)
Wasn't able to reproduce with gstwebrtc-demo, because latest revisions work differently and do not seem to fire on-new-transceiver
event.
I'm not sure if this is an issue with bindings specifically or not.
P.S. Would be nice to set codec_preferences
though if someone knows how :)