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.
This commit is contained in:
Gerhard Sittig 2017-06-09 23:07:25 +02:00
parent d05b1a8606
commit f027208ea7
1 changed files with 0 additions and 1 deletions

View File

@ -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;