gst/gstprobe.c: Check for existence of probe after performing the probe before re-accessing it to prevent segfaults c...

Original commit message from CVS:
* gst/gstprobe.c: (gst_probe_dispatcher_dispatch):
Check for existence of probe after performing the probe before
re-accessing it to prevent segfaults caused by removal of the
probe in the callback.
This commit is contained in:
Ronald S. Bultje 2005-01-07 16:40:38 +00:00
parent d3178f5a44
commit 374b65ad37
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2005-01-07 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/gstprobe.c: (gst_probe_dispatcher_dispatch):
Check for existence of probe after performing the probe before
re-accessing it to prevent segfaults caused by removal of the
probe in the callback.
2005-01-05 David Schleef <ds@schleef.org>
* testsuite/registry/Makefile.am:

View file

@ -218,7 +218,8 @@ gst_probe_dispatcher_dispatch (GstProbeDispatcher * disp, GstData ** data)
walk = g_slist_next (walk);
res &= gst_probe_perform (probe, data);
if (probe->single_shot) {
/* it might have disappeared in the callback */
if (g_slist_find (disp->probes, probe) && probe->single_shot) {
disp->probes = g_slist_remove (disp->probes, probe);
gst_probe_destroy (probe);