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
This commit is contained in:
Justin Kim 2015-09-22 23:10:35 +09:00 committed by Thibault Saunier
parent 0b900bddc9
commit bd1d03202b
2 changed files with 3 additions and 8 deletions

View file

@ -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;

View file

@ -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");