mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-07 04:11:26 +00:00
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:
parent
f2b50b7bd2
commit
a9090746e5
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
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),
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue