mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +00:00
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
This commit is contained in:
parent
b7516dbf7c
commit
780c83d5c4
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue