From f027208ea7c058d482620af39be38835c045895f Mon Sep 17 00:00:00 2001 From: Gerhard Sittig Date: Fri, 9 Jun 2017 23:07:25 +0200 Subject: [PATCH] input/csv: Fixup datafeed chunk size calculation The constant at the top of the source file is the number of samples in a datafeed submission chunk. The previous implementation erroneously made it the size in bytes. There is no need to round down the buffer size according to the unit size. --- src/input/csv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/input/csv.c b/src/input/csv.c index a9e5f91f..ad18e322 100644 --- a/src/input/csv.c +++ b/src/input/csv.c @@ -625,7 +625,6 @@ static int initial_parse(const struct sr_input *in, GString *buf) */ inc->sample_unit_size = (inc->num_channels + 7) / 8; inc->datafeed_buf_size = DATAFEED_MAX_SAMPLES; - inc->datafeed_buf_size /= inc->sample_unit_size; inc->datafeed_buf_size *= inc->sample_unit_size; inc->datafeed_buffer = g_malloc(inc->datafeed_buf_size); inc->datafeed_buf_fill = 0;