[Bug 795987] pad: Race condition with probe cookies causing the same probe to be called multiple times

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu May 10 08:43:41 UTC 2018


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

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

::: gst/gstpad.c
@@ +3475,2 @@
   /* if we have called this callback, do nothing */
+  for (i = 0; i < data->n_called_probes; i++) {

This loop is quadratic in number of probes... but this shouldn't really matter
in practice.

@@ +3487,3 @@
+      data->called_probes_size *= 2;
+      data->called_probes =
+          g_renew (GHook *, data->called_probes, data->called_probes_size);

realloc here because it's potentially more efficient than the code path below
with memcpy

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