From 9953480464f46cc84d074bbe4781cdbe157ad8ff Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 21 May 2007 12:43:37 +0000 Subject: 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. --- gst/spectrum/gstspectrum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gst/spectrum') 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; -- cgit v1.2.1