]> git.sesse.net Git - nageru/blobdiff - resampling_queue.cpp
Fix another bug in ResamplingQueue::get_output_samples() with non-stereo signals.
[nageru] / 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;
                }