mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
validate: unref copied and pasted
This commit is contained in:
parent
615bf9e47a
commit
94db57b9bd
1 changed files with 7 additions and 0 deletions
|
@ -806,7 +806,12 @@ _copy_element (GstValidateScenario * scenario, GstValidateAction * action)
|
|||
|
||||
copied = ges_timeline_element_copy (element, recursive);
|
||||
pasted = ges_timeline_element_paste (copied, position);
|
||||
/* `copied` is only used for the single paste operation, and is not
|
||||
* actually in any timeline. We own it (it is actually still floating).
|
||||
* `pasted` is the actual new object in the timeline. We own a
|
||||
* reference to it. */
|
||||
gst_object_unref (timeline);
|
||||
gst_object_unref (copied);
|
||||
|
||||
if (!pasted) {
|
||||
GST_VALIDATE_REPORT_ACTION (scenario, action,
|
||||
|
@ -822,9 +827,11 @@ _copy_element (GstValidateScenario * scenario, GstValidateAction * action)
|
|||
g_quark_from_string ("scenario::execution-error"),
|
||||
"Could not set element name %s", paste_name);
|
||||
|
||||
gst_object_unref (pasted);
|
||||
return GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED;
|
||||
}
|
||||
}
|
||||
gst_object_unref (pasted);
|
||||
|
||||
return GST_VALIDATE_EXECUTE_ACTION_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue