summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--gst/spectrum/gstspectrum.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e435dc77..e1cafb9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-05-21 Stefan Kost <ensonic@users.sf.net>
+
+ * gst/spectrum/gstspectrum.c (gst_spectrum_set_property,
+ gst_spectrum_event, gst_spectrum_transform_ip):
+ Use lock to protect from concurrent access.
+
2007-05-21 Sebastian Dröge <slomo@circular-chaos.org>
* ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_class_init),
diff --git a/gst/spectrum/gstspectrum.c b/gst/spectrum/gstspectrum.c
index 4cbd889b..fb42835e 100644
--- a/gst/spectrum/gstspectrum.c
+++ b/gst/spectrum/gstspectrum.c
@@ -237,10 +237,11 @@ gst_spectrum_set_property (GObject * object, guint prop_id,
filter->interval = g_value_get_uint64 (value);
break;
case PROP_BANDS:
- /* FIXME, this will segfault when the transform function is running */
+ GST_OBJECT_LOCK (filter);
filter->bands = g_value_get_uint (value);
g_free (filter->spect);
filter->spect = g_malloc (filter->bands * sizeof (guchar));
+ GST_OBJECT_UNLOCK (filter);
GST_DEBUG_OBJECT (filter, "reallocation, spect = %p, bands =%d ",
filter->spect, filter->bands);
break;