[Bug 763338] funnel: add 'forward-sticky-events-mode' property

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Mar 9 10:46:13 UTC 2016


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

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #323494|none                        |needs-work
             status|                            |

--- Comment #8 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 323494:
 --> (https://bugzilla.gnome.org/review?bug=763338&attachment=323494)

::: plugins/elements/gstfunnel.c
@@ +121,3 @@
+  GstFunnelPad *pad = GST_FUNNEL_PAD_CAST (gobject);
+
+  g_slist_free_full (pad->events_sent, (GDestroyNotify) gst_event_unref);

Ok, if it's needed please chain up to the parent class' finalize here :)
Otherwise you leak memory

@@ +183,3 @@
+      funnel->forward_sticky_events_mode =
+          v ? GST_FUNNEL_FORWARD_STICKY_EVENTS_MODE_ALWAYS :
+          GST_FUNNEL_FORWARD_STICKY_EVENTS_MODE_NEVER;

Wasn't the old mode the same as ALWAYS / ONCE?

@@ +396,3 @@
+    ret = gst_pad_push_event (funnel->srcpad, gst_event_ref (event));
+    funnelpad->events_sent =
+        g_slist_append (funnelpad->events_sent, gst_event_ref (event));

Appending to a GSList/GList is expensive. You don't care about order (or do
you?), so just prepend. Or use a GQueue

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