mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-08 00:59:48 +00:00
resindvd: Take a copy of the passed plugin features
Clarify the ownership of the internal plugin feature list by making a copy of any passed list. Avoids crashes when freeing a passed list, or leaks caused by not freeing any internally built list.
This commit is contained in:
parent
f7b832d19b
commit
570a0bb65c
1 changed files with 4 additions and 3 deletions
|
@ -289,9 +289,10 @@ gst_auto_convert_set_property (GObject * object,
|
|||
break;
|
||||
case PROP_FACTORIES:
|
||||
GST_AUTOCONVERT_LOCK (autoconvert);
|
||||
if (autoconvert->factories == NULL)
|
||||
autoconvert->factories = g_value_get_pointer (value);
|
||||
else
|
||||
if (autoconvert->factories == NULL) {
|
||||
GList *factories = g_value_get_pointer (value);
|
||||
autoconvert->factories = gst_plugin_feature_list_copy (factories);
|
||||
} else
|
||||
GST_WARNING_OBJECT (object, "Can not reset factories after they"
|
||||
" have been set or auto-discovered");
|
||||
GST_AUTOCONVERT_UNLOCK (autoconvert);
|
||||
|
|
Loading…
Reference in a new issue