summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sourceforge.net>2007-05-21 12:43:37 +0000
committerStefan Kost <ensonic@users.sourceforge.net>2007-05-21 12:43:37 +0000
commit9953480464f46cc84d074bbe4781cdbe157ad8ff (patch)
tree43042d3aaa5b2dcea37e07c947ae72a7244bcb24
parent500ed581ae8d715db66615d53905d21b1989cdd9 (diff)
downloadgst-plugins-bad-9953480464f46cc84d074bbe4781cdbe157ad8ff.tar.gz
gst-plugins-bad-9953480464f46cc84d074bbe4781cdbe157ad8ff.tar.bz2
gst-plugins-bad-9953480464f46cc84d074bbe4781cdbe157ad8ff.zip
gst/spectrum/gstspectrum.c (gst_spectrum_set_property, gst_spectrum_event, gst_spectrum_transform_ip):
Original commit message from CVS: * gst/spectrum/gstspectrum.c (gst_spectrum_set_property, gst_spectrum_event, gst_spectrum_transform_ip): Use lock to protect from concurrent access.
-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;