diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2007-08-10 05:51:40 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2007-08-10 05:51:40 +0000 |
commit | 71a8b2e7bc4fd1f9cc7c7ff527c518dcd4d088f9 (patch) | |
tree | 0c4f184bfb4a1c70459f8d23642bca8cec96a562 /gst/audiofx/audiowsincband.c | |
parent | 5fbac0f58d6110387bedb179381219918f8ff002 (diff) |
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.
Diffstat (limited to 'gst/audiofx/audiowsincband.c')
-rw-r--r-- | gst/audiofx/audiowsincband.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/audiofx/audiowsincband.c b/gst/audiofx/audiowsincband.c index dcf7c68f..d6bb3d12 100644 --- a/gst/audiofx/audiowsincband.c +++ b/gst/audiofx/audiowsincband.c @@ -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 */ |