summaryrefslogtreecommitdiffstats
path: root/gst/apetag
diff options
context:
space:
mode:
authorSebastian Dröge <mail@slomosnail.de>2006-12-06 13:16:59 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2006-12-06 13:16:59 +0000
commit4f799e000fe29c214ce29156c1794a27001fb595 (patch)
tree06f4c7571cba64fbeca9cc43fe86716e886ff257 /gst/apetag
parent1fd0727d5fbca6a596bcaac33232300395ce7fd4 (diff)
gst/apetag/gstapedemux.c: Use g_strtod() instead of sscanf to parse doubles, so that it will try parsing in the C loc...
Original commit message from CVS: * gst/apetag/gstapedemux.c: (ape_demux_parse_tags): Use g_strtod() instead of sscanf to parse doubles, so that it will try parsing in the C locale if the current locale fails. Fixes: #382982 Patch by: Sebastian Dröge <mail at slomosnail de >
Diffstat (limited to 'gst/apetag')
-rw-r--r--gst/apetag/gstapedemux.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/apetag/gstapedemux.c b/gst/apetag/gstapedemux.c
index 6675995b..73f9e467 100644
--- a/gst/apetag/gstapedemux.c
+++ b/gst/apetag/gstapedemux.c
@@ -278,11 +278,14 @@ ape_demux_parse_tags (const guint8 * data, gint size)
}
case G_TYPE_DOUBLE:{
gdouble v_double;
+ gchar *endptr;
- if (sscanf (val, "%lf", &v_double) == 1) {
+ v_double = g_strtod (val, &endptr);
+ if (endptr != val) {
g_value_init (&v, G_TYPE_DOUBLE);
g_value_set_double (&v, v_double);
}
+
break;
}
default:{