diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2014-06-26 11:16:34 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2014-06-26 11:16:34 +0300 |
commit | 780c83d5c4dd5b2676e23f185e739567c4e817a8 (patch) | |
tree | e7f1093cc39862539b7e1bf502002e617e7d94b5 | |
parent | b7516dbf7cfc0321f7ec918bfaf27dcbd49fd130 (diff) | |
download | gstreamer-780c83d5c4dd5b2676e23f185e739567c4e817a8.tar.gz |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/gstcaps.c b/gst/gstcaps.c index 4525ead1fc..51f7ae4e04 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); + } } /** |