[gst-devel] patch for parsing double args

Steve Baker sbaker at chello.com
Mon Mar 5 10:16:36 CET 2001

Here is a slightly cleaner version of the same patch which has been
de-yahooed.  The patch fixes a problem which meant that no double args were
getting through due to float/double casting issues.

-----Original Message-----
From: Steve Baker [mailto:stevebaker_org at yahoo.co.uk]
Sent: zondag 4 maart 2001 15:25
To: gstreamer-devel at lists.sourceforge.net
Subject: [gst-devel] patch for parsing double args

This patch fixes a problem with parsing double args
from strings.

Index: gstutils.c
RCS file:
retrieving revision 1.9
diff -u -r1.9 gstutils.c
--- gstutils.c	2001/03/03 18:19:38	1.9
+++ gstutils.c	2001/03/04 14:21:08
@@ -247,9 +247,9 @@
         case GTK_TYPE_DOUBLE: {
-	  gdouble i;
-	  sscanf (value, "%g", (float *)&i);
-          gtk_object_set (GTK_OBJECT (object), name, i, NULL);
+	  gfloat i;
+	  sscanf (value, "%g", &i);
+          gtk_object_set (GTK_OBJECT (object), name, (gdouble)i, NULL);

More information about the gstreamer-devel mailing list