summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2014-06-26 11:16:34 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2014-06-26 11:16:34 +0300
commit780c83d5c4dd5b2676e23f185e739567c4e817a8 (patch)
treee7f1093cc39862539b7e1bf502002e617e7d94b5
parentb7516dbf7cfc0321f7ec918bfaf27dcbd49fd130 (diff)
caps: unset the parent refcount of the old features before freeing them in gst_caps_set_features()
Otherwise gst_caps_features_free() asserts and the features structure is leaked
-rw-r--r--gst/gstcaps.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/gstcaps.c b/gst/gstcaps.c
index 4525ead1f..51f7ae4e0 100644
--- a/gst/gstcaps.c
+++ b/gst/gstcaps.c
@@ -901,8 +901,10 @@ gst_caps_set_features (GstCaps * caps, guint index, GstCapsFeatures * features)
if (features)
gst_caps_features_set_parent_refcount (features, &GST_CAPS_REFCOUNT (caps));
- if (old)
+ if (old) {
+ gst_caps_features_set_parent_refcount (old, NULL);
gst_caps_features_free (old);
+ }
}
/**