summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2007-08-10 05:51:40 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2007-08-10 05:51:40 +0000
commita9090746e58e9a994d7f07f61452602b31461e1e (patch)
tree57f978b017569598168f4f29ebd54e9fb192bde4
parentf2b50b7bd2c02ce0764a9537ca210bff97ad1084 (diff)
downloadgst-plugins-bad-a9090746e58e9a994d7f07f61452602b31461e1e.tar.gz
gst-plugins-bad-a9090746e58e9a994d7f07f61452602b31461e1e.tar.bz2
gst-plugins-bad-a9090746e58e9a994d7f07f61452602b31461e1e.zip
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.
-rw-r--r--ChangeLog6
-rw-r--r--gst/filter/gstbpwsinc.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 443b77ff..c5db4dd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2007-08-10 Sebastian Dröge <slomo@circular-chaos.org>
+ * 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.
+
+2007-08-10 Sebastian Dröge <slomo@circular-chaos.org>
+
* gst/filter/gstbpwsinc.c: (gst_bpwsinc_mode_get_type),
(gst_bpwsinc_window_get_type), (gst_bpwsinc_class_init),
(gst_bpwsinc_init), (bpwsinc_build_kernel), (bpwsinc_set_property),
diff --git a/gst/filter/gstbpwsinc.c b/gst/filter/gstbpwsinc.c
index dcf7c68f..d6bb3d12 100644
--- a/gst/filter/gstbpwsinc.c
+++ b/gst/filter/gstbpwsinc.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 */