mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
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.
This commit is contained in:
parent
e3af2aab07
commit
5e9e882543
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue