Commit b8b6dbd3 authored by George Kiagiadakis's avatar George Kiagiadakis Committed by Tim-Philipp Müller
Browse files

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
parent 8257fdcb
......@@ -882,8 +882,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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment