diff --git a/gst/spectrum/gstspectrum.c b/gst/spectrum/gstspectrum.c index 587cf8e37e..824cbb571d 100644 --- a/gst/spectrum/gstspectrum.c +++ b/gst/spectrum/gstspectrum.c @@ -513,8 +513,8 @@ gst_spectrum_transform_ip (GstBaseTransform * trans, GstBuffer * buffer) gst_spectrum_reset_state (spectrum); } - /* If we don't have a FFT context yet get one and - * allocate memory for everything + /* If we don't have a FFT context yet (or it was reset due to parameter + * changes) get one and allocate memory for everything */ if (spectrum->fft_ctx == NULL) { spectrum->input = g_new0 (gfloat, nfft); diff --git a/gst/spectrum/gstspectrum.h b/gst/spectrum/gstspectrum.h index e676fd2ddb..d172f6cee3 100644 --- a/gst/spectrum/gstspectrum.h +++ b/gst/spectrum/gstspectrum.h @@ -59,8 +59,8 @@ struct _GstSpectrum guint input_pos; gfloat *input_tmp; GstFFTF32Complex *freqdata; - gfloat *spect_magnitude; - gfloat *spect_phase; + gfloat *spect_magnitude; /* accumulated mangitude and phase */ + gfloat *spect_phase; /* will be scaled by num_fft before sending */ GstFFTF32 *fft_ctx; guint64 error_per_interval;