gst/filter/gstbpwsinc.c: Fix a segfault with more than one channel and don't rebuild the kernel & residue with every ...

Original commit message from CVS:
* gst/filter/gstbpwsinc.c: (bpwsinc_build_kernel):
Fix a segfault with more than one channel and don't rebuild
the kernel & residue with every buffer.
This commit is contained in:
Sebastian Dröge 2007-08-10 05:51:40 +00:00
parent 5fbac0f58d
commit 71a8b2e7bc

View file

@ -313,6 +313,8 @@ bpwsinc_build_kernel (GstBPWSinc * self)
return;
}
self->have_kernel = TRUE;
/* Clamp frequencies */
self->lower_frequency =
CLAMP (self->lower_frequency, 0.0,
@ -412,7 +414,8 @@ bpwsinc_build_kernel (GstBPWSinc * self)
if (self->residue)
g_free (self->residue);
self->residue = g_new0 (gdouble, len);
self->residue =
g_new0 (gdouble, len * GST_AUDIO_FILTER (self)->format.channels);
}
/* GstAudioFilter vmethod implementations */