]> git.sesse.net Git - nageru/commitdiff
Fix another bug in ResamplingQueue::get_output_samples() with non-stereo signals.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 28 Aug 2016 15:55:33 +0000 (17:55 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 28 Aug 2016 15:56:27 +0000 (17:56 +0200)
resampling_queue.cpp

index e2483f90c83f0ebedb9d0a17892a0ea0f0700555..d3294475017115fb0b3acdd97fa8b77325a4ce1b 100644 (file)
@@ -132,7 +132,7 @@ bool ResamplingQueue::get_output_samples(double pts, float *samples, ssize_t num
                        // or we're dropping a lot of data.
                        fprintf(stderr, "Card %u: PANIC: Out of input samples to resample, still need %d output samples! (correction factor is %f)\n",
                                card_num, int(vresampler.out_count), rcorr);
-                       memset(vresampler.out_data, 0, vresampler.out_count * 2 * sizeof(float));
+                       memset(vresampler.out_data, 0, vresampler.out_count * num_channels * sizeof(float));
                        return false;
                }