summaryrefslogtreecommitdiffstats
path: root/gst/speexresample
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-10-30 14:55:43 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-10-30 14:55:43 +0000
commit8d54b879f981efd05142e36f29a4558ee83342f1 (patch)
tree1d8035b494ac3985697de3be7deba1005afb36a4 /gst/speexresample
parent275751f50934d40708298b76056e96a1698aa87b (diff)
downloadgst-plugins-bad-8d54b879f981efd05142e36f29a4558ee83342f1.tar.gz
gst-plugins-bad-8d54b879f981efd05142e36f29a4558ee83342f1.tar.bz2
gst-plugins-bad-8d54b879f981efd05142e36f29a4558ee83342f1.zip
gst/speexresample/gstspeexresample.c: The length for the buffer conversion function is the number of audio frames, i....
Original commit message from CVS: * gst/speexresample/gstspeexresample.c: (gst_speex_resample_convert_buffer): The length for the buffer conversion function is the number of audio frames, i.e. we need to multiply it by the number of channels to get the number of values. Also spotted by the unit test after running in valgrind.
Diffstat (limited to 'gst/speexresample')
-rw-r--r--gst/speexresample/gstspeexresample.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/speexresample/gstspeexresample.c b/gst/speexresample/gstspeexresample.c
index 798e0c6f..7d04257a 100644
--- a/gst/speexresample/gstspeexresample.c
+++ b/gst/speexresample/gstspeexresample.c
@@ -569,6 +569,8 @@ static void
gst_speex_resample_convert_buffer (GstSpeexResample * resample,
const guint8 * in, guint8 * out, guint len, gboolean inverse)
{
+ len *= resample->channels;
+
if (inverse) {
if (resample->width == 8 && !resample->fp) {
gint8 *o = (gint8 *) out;