From 23434848d3ddfe25f455d48793cf0438c9ec7966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 4 Feb 2014 17:48:54 +0100 Subject: [PATCH] capsfeatures: Make sure that the static ANY/EMPTY capsfeatures are never mutable See https://bugzilla.gnome.org/show_bug.cgi?id=723236 --- gst/gstcapsfeatures.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/gstcapsfeatures.c b/gst/gstcapsfeatures.c index b22da1c3bf..38fcef7472 100644 --- a/gst/gstcapsfeatures.c +++ b/gst/gstcapsfeatures.c @@ -66,6 +66,7 @@ struct _GstCapsFeatures }; GType _gst_caps_features_type = 0; +static gint static_caps_features_parent_refcount = G_MAXINT; GstCapsFeatures *_gst_caps_features_any = NULL; GstCapsFeatures *_gst_caps_features_memory_system_memory = NULL; static GQuark _gst_caps_feature_memory_system_memory = 0; @@ -95,8 +96,13 @@ _priv_gst_caps_features_initialize (void) gst_caps_features_transform_to_string); _gst_caps_features_any = gst_caps_features_new_any (); + gst_caps_features_set_parent_refcount (_gst_caps_features_any, + &static_caps_features_parent_refcount); _gst_caps_features_memory_system_memory = gst_caps_features_new_id (_gst_caps_feature_memory_system_memory, 0); + gst_caps_features_set_parent_refcount + (_gst_caps_features_memory_system_memory, + &static_caps_features_parent_refcount); } gboolean