From 35a5ad819d18095385f0e3184eac5db4588da51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 30 Oct 2008 14:55:43 +0000 Subject: [PATCH] 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. --- gst/speexresample/gstspeexresample.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/speexresample/gstspeexresample.c b/gst/speexresample/gstspeexresample.c index 798e0c6fb3..7d04257a37 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;