Hi, I’m having an issue requesting an audio pad from the dashsink element in Rust, it appears that the pad name is lost when reaching the C code.
Here’s a code snippet to replicate this
let pipeline = gst::Pipeline::new();
let dash_sink = gst::ElementFactory::make("dashsink").build()?;
pipeline.add(&dash_sink).unwrap();
let video_pad = dash_sink.request_pad_simple("video_%u").unwrap(); // This works fine
let audio_pad = dash_sink.request_pad_simple("audio_%u").unwrap(); // This panics
GST_DEBUG output:
GStreamer-CRITICAL **: 10:17:46.504: gst_element_request_pad_simple: assertion 'name != NULL' failed
0:00:00.008628996 400642 0xffff54003f00 ERROR dashsink gstdashsink.c:993:gst_dash_sink_request_new_pad:<dashsink0> Unable to request pad name (null)
GDB Output (Rust side)
#9 0x0000aaab653267b4 [PAC] in gstreamer::element::ElementExtManual::request_pad_simple<gstreamer::auto::element::Element> (self=0xffff556d6868, name=...)
at /home/guillaume/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gstreamer-0.23.5/src/element.rs:648
648 from_glib_full(ffi::gst_element_request_pad_simple(
(gdb) print name
$1 = "audio_%u"
GDB Output (C side)
#8 0x0000ffff56f5d9b4 [PAC] in _gst_element_request_pad (element=0xffff44323990 [GstDashSink|dashsink0], templ=0xffff44162f20 [GstPadTemplate|audio_%u], name=0x0, caps=0x0)
at ../gstreamer-1.24.11/gst/gstelement.c:1179
1179 newpad = (oclass->request_new_pad) (element, templ, name, caps);
(gdb) print name
$2 = (const gchar *) 0x0
Does anyone have any idea why this is happening, or if there’s something obviously wrong I’m doing ?