gstreamer: caps: Add missing assertion in Caps::remove_structure()

Part of 9e2c6268cb.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1447>
This commit is contained in:
Sebastian Dröge 2024-05-23 09:50:33 +03:00
parent f055daf01b
commit 77a012114d

View file

@ -445,6 +445,8 @@ impl CapsRef {
#[doc(alias = "gst_caps_remove_structure")]
pub fn remove_structure(&mut self, idx: u32) {
assert!(idx < self.size());
unsafe { ffi::gst_caps_remove_structure(self.as_mut_ptr(), idx) }
}