mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
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 >
This commit is contained in:
parent
1fd0727d5f
commit
4f799e000f
2 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2006-12-06 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
|
* 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 >
|
||||||
|
|
||||||
2006-12-01 Jan Schmidt <thaytan@mad.scientist.com>
|
2006-12-01 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* win32/MANIFEST:
|
* win32/MANIFEST:
|
||||||
|
|
|
@ -278,11 +278,14 @@ ape_demux_parse_tags (const guint8 * data, gint size)
|
||||||
}
|
}
|
||||||
case G_TYPE_DOUBLE:{
|
case G_TYPE_DOUBLE:{
|
||||||
gdouble v_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_init (&v, G_TYPE_DOUBLE);
|
||||||
g_value_set_double (&v, v_double);
|
g_value_set_double (&v, v_double);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:{
|
default:{
|
||||||
|
|
Loading…
Reference in a new issue