input/csv: Use uint64 for samplerate option.

This commit is contained in:
Bert Vermeulen 2014-08-30 20:16:45 +02:00
parent edd28877cc
commit 6e8d95a50c
1 changed files with 2 additions and 6 deletions

View File

@ -429,11 +429,7 @@ static int init(struct sr_input *in, GHashTable *options)
g_string_truncate(inc->comment, 0);
}
s = g_variant_get_string(g_hash_table_lookup(options, "samplerate"), NULL);
if (sr_parse_sizestring(s, &inc->samplerate) != SR_OK) {
sr_err("Invalid samplerate '%s'.", s);
return SR_ERR_ARG;
}
inc->samplerate = g_variant_get_uint64(g_hash_table_lookup(options, "samplerate"));
inc->first_channel = g_variant_get_int32(g_hash_table_lookup(options, "first-channel"));
@ -778,7 +774,7 @@ static struct sr_option *get_options(void)
options[2].def = g_variant_ref_sink(g_variant_new_string(","));
options[3].def = g_variant_ref_sink(g_variant_new_string("bin"));
options[4].def = g_variant_ref_sink(g_variant_new_string(";"));
options[5].def = g_variant_ref_sink(g_variant_new_string("0"));
options[5].def = g_variant_ref_sink(g_variant_new_uint64(0));
options[6].def = g_variant_ref_sink(g_variant_new_int32(0));
options[7].def = g_variant_ref_sink(g_variant_new_boolean(FALSE));
options[8].def = g_variant_ref_sink(g_variant_new_int32(1));