summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Kim <justin.kim@collabora.com>2015-09-22 23:10:35 +0900
committerThibault Saunier <tsaunier@gnome.org>2015-09-24 13:05:55 +0200
commitbd1d03202bdd278df7db3558e9df49082ade485d (patch)
tree77dd5bad6259759a7b4409130186c8b4321d4160
parent0b900bddc9eb534535e57c42afd27b6fc8d97399 (diff)
nle{composition,object}: remove unused allocation & trivial leakages
nlecomposition allocates unused 'UpdateCompositionData' and it causes leakages. https://bugzilla.gnome.org/show_bug.cgi?id=755417
-rw-r--r--plugins/nle/nlecomposition.c8
-rw-r--r--plugins/nle/nleobject.c3
2 files changed, 3 insertions, 8 deletions
diff --git a/plugins/nle/nlecomposition.c b/plugins/nle/nlecomposition.c
index 5bea0681..e204501f 100644
--- a/plugins/nle/nlecomposition.c
+++ b/plugins/nle/nlecomposition.c
@@ -396,6 +396,7 @@ _start_task (NleComposition * comp)
gst_task_set_lock (task, GET_TASK_LOCK (comp));
GST_DEBUG_OBJECT (comp, "created task %p", task);
comp->task = task;
+ g_free (taskname);
}
gst_task_set_state (task, GST_TASK_STARTED);
@@ -760,11 +761,11 @@ _add_action (NleComposition * comp, GCallback func,
Action *action;
NleCompositionPrivate *priv = comp->priv;
-
action = (Action *) g_closure_new_simple (sizeof (Action), data);
g_closure_add_finalize_notifier ((GClosure *) action, data,
(GClosureNotify) _free_action);
ACTION_CALLBACK (action) = func;
+
action->priority = priority;
g_closure_set_marshal ((GClosure *) action, g_cclosure_marshal_VOID__VOID);
@@ -2873,16 +2874,11 @@ update_pipeline (NleComposition * comp, GstClockTime currenttime, gint32 seqnum,
priv->current = stack;
if (priv->current) {
- UpdateCompositionData *ucompo = g_slice_new0 (UpdateCompositionData);
GST_INFO_OBJECT (comp, "New stack set and ready to run, probing src pad"
" and stopping children thread until we are actually ready with"
" that new stack");
- ucompo->comp = comp;
- ucompo->reason = update_reason;
- ucompo->seqnum = seqnum;
-
comp->priv->updating_reason = update_reason;
comp->priv->seqnum_to_restart_task = seqnum;
diff --git a/plugins/nle/nleobject.c b/plugins/nle/nleobject.c
index bccf8d24..e8db1db2 100644
--- a/plugins/nle/nleobject.c
+++ b/plugins/nle/nleobject.c
@@ -608,8 +608,7 @@ nle_object_change_state (GstElement * element, GstStateChange transition)
/* Going to READY and if we are not in a composition, we need to make
* sure that the object positioning state is properly commited */
if (parent) {
- if (g_strcmp0 (gst_element_get_name (GST_ELEMENT (parent)),
- "current-bin")
+ if (g_strcmp0 (GST_ELEMENT_NAME (GST_ELEMENT (parent)), "current-bin")
&& !NLE_OBJECT_IS_COMPOSITION (NLE_OBJECT (element))) {
GST_INFO ("Adding nleobject to something that is not a composition,"
" commiting ourself");