Speculative fix for resampler input/output array overlap error.
authorCarl Hetherington <cth@carlh.net>
Thu, 14 Apr 2016 19:09:02 +0000 (20:09 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 14 Apr 2016 19:09:02 +0000 (20:09 +0100)
src/lib/resampler.cc

index 43dc501625800a66a6e0ad39ea44aedf72abda88..faf07e2a712d974c6d73da3247ab433c4edf6a8e 100644 (file)
@@ -139,7 +139,11 @@ Resampler::flush ()
        int out_offset = 0;
        int64_t const output_size = 65536;
 
-       float dummy[1];
+       /* I think this should only need to be 1 long, but I have seen
+          src_process error with "input and output data arrays overlap"
+          with dummy[1] (on OS X).  I've added a few more for luck.
+       */
+       float dummy[16];
        float buffer[output_size];
 
        SRC_DATA data;