From 4f799e000fe29c214ce29156c1794a27001fb595 Mon Sep 17 00:00:00 2001 From: Sebastian Dröge Date: Wed, 6 Dec 2006 13:16:59 +0000 Subject: gst/apetag/gstapedemux.c: Use g_strtod() instead of sscanf to parse doubles, so that it will try parsing in the C loc... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ChangeLog | 8 ++++++++ gst/apetag/gstapedemux.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c283c662..7f2f5970 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-12-06 Jan Schmidt + + * 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 + 2006-12-01 Jan Schmidt * win32/MANIFEST: 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:{ -- cgit