[Bug 755772] nlecomposition lost its GClosure actions

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Sep 30 03:30:58 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=755772

--- Comment #5 from Justin J. Kim <justin.joy.9to5 at gmail.com> ---
Review of attachment 312345:
 --> (https://bugzilla.gnome.org/review?bug=755772&attachment=312345)

::: plugins/nle/nlecomposition.c
@@ +335,2 @@
       g_closure_unref ((GClosure *) act);
+      comp->priv->actions = g_list_remove_link (comp->priv->actions, removed);

In the for loop, tmp should be valid for next turn, but, I thought, 'tmp'
variable could be invalid after calling g_list_delete_link.

The previous code might be same as below.

for (....; tmp->next) {
  g_list_remove_link (actions, tmp);
  g_list_free (tmp); 
}

In this code, for loop will access 'tmp' variable after freed.

So I introduced 'removed' variable to free orphan item safely.

@@ +1019,3 @@
   priv->dispose_has_run = TRUE;

+  g_list_foreach (priv->objects_start, _remove_each_nleobj, comp);

Once I tried to use "g_list_free_full".
But I cannot get NleComposition pointer properly because g_list_free_full
doesn't have user_data argument.

@@ +2342,3 @@
+  }
+
+  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);

I tend to give more chance to invoke gclosures when the element goes NULL
state.
Even after setting NULL state to nlecomposition element, Actions are
consistently added to the list of Action(priv->actions).

The term until parent element finish its state transition could be very small,
but, 
I thought, it would be better to invoke them rather than just to drop. If task
stops, each action will not be invoked and should be dropped in dispose
function.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list