gst/speexresample/gstspeexresample.c: The length for the buffer conversion function...
authorSebastian Dröge <slomo@circular-chaos.org>
Thu, 30 Oct 2008 14:55:43 +0000 (14:55 +0000)
committerSebastian Dröge <slomo@circular-chaos.org>
Thu, 30 Oct 2008 14:55:43 +0000 (14:55 +0000)
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.

ChangeLog
gst/speexresample/gstspeexresample.c

index 7f417f1..b697f77 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2008-10-30  Sebastian Dröge  <slomo@circular-chaos.org>
 
+       * 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.
+
+2008-10-30  Sebastian Dröge  <slomo@circular-chaos.org>
+
        * tests/check/elements/speexresample.c: (element_message_cb),
        (eos_message_cb), (test_pipeline), (GST_START_TEST),
        (speexresample_suite):
index 798e0c6..7d04257 100644 (file)
@@ -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;