gst/gstprobe.c: Another workaround for memory access while destroyed in callback.

Original commit message from CVS:
* gst/gstprobe.c: (gst_probe_dispatcher_dispatch):
Another workaround for memory access while destroyed in callback.
Please, someone with refcount knowledge, have a look at this.
This commit is contained in:
Ronald S. Bultje 2005-01-16 14:36:58 +00:00
parent 9208245db0
commit 7e75b2b0f0
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2005-01-16 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/gstprobe.c: (gst_probe_dispatcher_dispatch):
Another workaround for memory access while destroyed in callback.
Please, someone with refcount knowledge, have a look at this.
2005-01-15 Thomas Vander Stichele <thomas at apestaart dot org> 2005-01-15 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/faq/faq.xml: * docs/faq/faq.xml:

View file

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