gstreamer: Unconditionally use gst_parse_context_copy()

It's available since 1.12.1 and the minimum supported version for the
bindings is 1.14 nowadays.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1478>
This commit is contained in:
Sebastian Dröge 2024-07-06 14:10:32 +03:00 committed by GStreamer Marge Bot
parent a871f71515
commit 94313e67c5

View file

@ -9,15 +9,7 @@ glib::wrapper! {
pub struct ParseContext(Boxed<ffi::GstParseContext>); pub struct ParseContext(Boxed<ffi::GstParseContext>);
match fn { match fn {
copy => |ptr| { copy => |ptr| ffi::gst_parse_context_copy(ptr),
cfg_if::cfg_if! {
if #[cfg(feature = "v1_12_1")] {
ffi::gst_parse_context_copy(ptr)
} else {
glib::gobject_ffi::g_boxed_copy(ffi::gst_parse_context_get_type(), ptr as *mut _) as *mut ffi::GstParseContext
}
}
},
free => |ptr| ffi::gst_parse_context_free(ptr), free => |ptr| ffi::gst_parse_context_free(ptr),
type_ => || ffi::gst_parse_context_get_type(), type_ => || ffi::gst_parse_context_get_type(),
} }