gst/gstprobe.c: Another workaround for memory access while destroyed in callback.
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sun, 16 Jan 2005 14:36:58 +0000 (14:36 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sun, 16 Jan 2005 14:36:58 +0000 (14:36 +0000)
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.

ChangeLog
gst/gstprobe.c

index 06baab2..8df968c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * docs/faq/faq.xml:
index 2e52016..1a43c83 100644 (file)
@@ -251,7 +251,8 @@ gst_probe_dispatcher_dispatch (GstProbeDispatcher * disp, GstData ** data)
 
     res &= gst_probe_perform (probe, data);
     /* 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);
 
       gst_probe_destroy (probe);