summaryrefslogtreecommitdiffstats
path: root/gst
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
commit5e9e882543c7e93dee0b99a9d92f9f8420a5c843 (patch)
tree314e542b0fa9013403394264d7371d9962352d27 /gst
parente3af2aab0754bec137dfbca1ffd55c6001bf0344 (diff)
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.
Diffstat (limited to 'gst')
-rw-r--r--gst/spectrum/gstspectrum.c3
1 files changed, 2 insertions, 1 deletions
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;