tracer: Buffer in `pad_pull_range_post` is nullable
This is a bindings issue. The code for pad_pull_range_post
today looks [like this]https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/bff1354b74c8d1296216d1a3a42f42c44d89dbe3/gstreamer/src/subclass/tracer.rs#L230-234):
PadPullRangePost("pad-pull-range-post") = |this, ts, p: *mut ffi::GstPad, b: *mut ffi::GstBuffer, r: ffi::GstFlowReturn| {
let p = Pad::from_glib_borrow(p);
let b = Buffer::from_glib_borrow(b);
this.pad_pull_range_post(ts, &p, &b, FlowReturn::from_glib(r))
};
Specifically this is calling Buffer::from_glib_borrow(b)
which then internally asserts that !b.is_null()
. However, this trace callback is not required to provide valid buffers. An example of this is when the gst_pad_pull_range
fails.