[xiph-commits] r12918 - trunk/speex/libspeex
jm at svn.xiph.org
jm at svn.xiph.org
Fri May 4 06:07:21 PDT 2007
Author: jm
Date: 2007-05-04 06:07:21 -0700 (Fri, 04 May 2007)
New Revision: 12918
Modified:
trunk/speex/libspeex/resample.c
Log:
fixed a segfault in the handling of magic samples.
Modified: trunk/speex/libspeex/resample.c
===================================================================
--- trunk/speex/libspeex/resample.c 2007-05-04 10:04:37 UTC (rev 12917)
+++ trunk/speex/libspeex/resample.c 2007-05-04 13:07:21 UTC (rev 12918)
@@ -658,9 +658,8 @@
{
spx_uint32_t i;
/* Reduce filter length, this a bit tricky */
- /*speex_warning("decrease filter size (unimplemented)");*/
- /* Adjust last_sample (which will likely end up negative) */
- /*st->last_sample += (st->filt_len - old_length)/2;*/
+ /* We must copy the memory that's no longer used into a new "magic"
+ section that will be used directly as input the next time(s)*/
for (i=0;i<st->nb_channels;i++)
{
spx_uint32_t j;
@@ -775,6 +774,7 @@
mem[N-1+i]=mem[N-1+i+tmp_in_len];
}
out += tmp_out_len;
+ *out_len -= tmp_out_len;
}
/* Call the right resampler through the function ptr */
More information about the commits
mailing list