From ba1b29121791c2a2235f33cf87a11563ac7da945 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Tue, 5 Aug 2025 15:34:14 +0200 Subject: [PATCH] gstreamer-1.0: Fix ownership of Caps.full*() parameters Fixes https://gitlab.gnome.org/GNOME/vala/issues/1628 --- vapi/gstreamer-1.0.vapi | 4 ++-- vapi/metadata/Gst-1.0-custom.vala | 2 +- vapi/metadata/Gst-1.0.metadata | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vapi/gstreamer-1.0.vapi b/vapi/gstreamer-1.0.vapi index e46217ae9..cc893a5bf 100644 --- a/vapi/gstreamer-1.0.vapi +++ b/vapi/gstreamer-1.0.vapi @@ -920,9 +920,9 @@ namespace Gst { public bool @foreach (Gst.CapsForeachFunc func); public static Gst.Caps? from_string (string string); [CCode (has_construct_function = false)] - public Caps.full (params Gst.Structure[] structure); + public Caps.full (params owned Gst.Structure[] structure); [CCode (has_construct_function = false)] - public Caps.full_valist (Gst.Structure structure, va_list var_args); + public Caps.full_valist (owned Gst.Structure structure, va_list var_args); [Version (since = "1.2")] public unowned Gst.CapsFeatures? get_features (uint index); public uint get_size (); diff --git a/vapi/metadata/Gst-1.0-custom.vala b/vapi/metadata/Gst-1.0-custom.vala index 1471ed8c9..0433d2c9a 100644 --- a/vapi/metadata/Gst-1.0-custom.vala +++ b/vapi/metadata/Gst-1.0-custom.vala @@ -31,7 +31,7 @@ namespace Gst { [Compact, CCode (ref_function = "gst_caps_ref", type_id = "gst_caps_get_type ()", unref_function = "gst_caps_unref")] public class Caps { [CCode (has_construct_function = false)] - public Caps.full (params Gst.Structure[] structure); + public Caps.full (params owned Gst.Structure[] structure); } [Compact, CCode (copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_caps_features_get_type ()")] diff --git a/vapi/metadata/Gst-1.0.metadata b/vapi/metadata/Gst-1.0.metadata index 0cc84770d..1afa5e728 100644 --- a/vapi/metadata/Gst-1.0.metadata +++ b/vapi/metadata/Gst-1.0.metadata @@ -83,6 +83,7 @@ parse_bin_from_description_full floating *.*_valist_* skip=false debug_log skip=false printf_format Caps + .new_full_valist.structure owned .new_simple skip=false .set_simple skip=false CapsFeatures -- 2.47.2