]> sigrok.org Git - libsigrok.git/blobdiff - input/binary.c
fs9922: Fix diode mode parsing.
[libsigrok.git] / input / binary.c
index 67d42f021c8626a332030b0e8b28b2be50744675..809e9ebbc3dd2291fd77aa0275076078c69b57ce 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * This file is part of the sigrok project.
+ * This file is part of the libsigrok project.
  *
  * Copyright (C) 2013 Bert Vermeulen <bert@biot.com>
  *
@@ -121,9 +121,11 @@ static int loadfile(struct sr_input *in, const char *filename)
        if (ctx->samplerate) {
                packet.type = SR_DF_META;
                packet.payload = &meta;
-               src = sr_config_new(SR_CONF_SAMPLERATE, (const void *)&ctx->samplerate);
+               src = sr_config_new(SR_CONF_SAMPLERATE,
+                               g_variant_new_uint64(ctx->samplerate));
                meta.config = g_slist_append(NULL, src);
                sr_session_send(in->sdi, &packet);
+               sr_config_free(src);
        }
 
        /* Chop up the input file into chunks & send it to the session bus. */