From 7652e2f780f5ba25fd0a1282e762233b91e68426 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Mon, 2 Jun 2014 13:14:52 +0200 Subject: [PATCH] Remove deprecated use of static mutex in moodbar. --- gst/moodbar/gstfftwspectrum.c | 7 ++++--- gst/moodbar/gstfftwspectrum.h | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gst/moodbar/gstfftwspectrum.c b/gst/moodbar/gstfftwspectrum.c index 8b32e93b8..7f502802c 100644 --- a/gst/moodbar/gstfftwspectrum.c +++ b/gst/moodbar/gstfftwspectrum.c @@ -221,6 +221,8 @@ gst_fftwspectrum_init (GstFFTWSpectrum * conv, conv->def_size = DEF_SIZE_DEFAULT; conv->def_step = DEF_STEP_DEFAULT; conv->hi_q = HIQUALITY_DEFAULT; + + g_mutex_init(&conv->mutex); } static void @@ -303,13 +305,12 @@ alloc_fftw_data (GstFFTWSpectrum *conv) * implementing filters. */ - static GStaticMutex mutex = G_STATIC_MUTEX_INIT; - g_static_mutex_lock(&mutex); + g_mutex_lock(&conv->mutex); conv->fftw_plan = fftw_plan_dft_r2c_1d(conv->size, conv->fftw_in, (fftw_complex *) conv->fftw_out, conv->hi_q ? FFTW_MEASURE : FFTW_ESTIMATE); - g_static_mutex_unlock(&mutex); + g_mutex_unlock(&conv->mutex); } diff --git a/gst/moodbar/gstfftwspectrum.h b/gst/moodbar/gstfftwspectrum.h index fc7647e7c..fe9a2f0e2 100644 --- a/gst/moodbar/gstfftwspectrum.h +++ b/gst/moodbar/gstfftwspectrum.h @@ -54,6 +54,8 @@ struct _GstFFTWSpectrum /* Properties */ gint32 def_size, def_step; gboolean hi_q; + + GMutex mutex; }; struct _GstFFTWSpectrumClass