From: Steinar H. Gunderson Date: Sun, 28 Aug 2016 15:55:33 +0000 (+0200) Subject: Fix another bug in ResamplingQueue::get_output_samples() with non-stereo signals. X-Git-Tag: 1.4.0~140 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=47e6a75f6bf88a7a1970965e719af76e8ec8d58e;p=nageru Fix another bug in ResamplingQueue::get_output_samples() with non-stereo signals. --- diff --git a/resampling_queue.cpp b/resampling_queue.cpp index e2483f9..d329447 100644 --- a/resampling_queue.cpp +++ b/resampling_queue.cpp @@ -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; }