From 73075e4637f0c6020ec26756506c23b9dadfafdf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 2 Sep 2013 00:19:30 +0100 Subject: [PATCH] ges-xml-formatter: use g_ascii_dtostr() instead of messing with setlocale() Libraries shouldn't use setlocale(). --- ges/ges-xml-formatter.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ges/ges-xml-formatter.c b/ges/ges-xml-formatter.c index 9551254..3b8ee09 100644 --- a/ges/ges-xml-formatter.c +++ b/ges/ges-xml-formatter.c @@ -825,9 +825,7 @@ _save_keyframes (GString * str, GESTrackElement * trackelement, gint index) if (GST_IS_INTERPOLATION_CONTROL_SOURCE (source)) { GList *timed_values, *tmp; GstInterpolationMode mode; - gchar *oldlocale = setlocale (LC_NUMERIC, NULL); - oldlocale = g_strdup (oldlocale); append_escaped (str, g_markup_printf_escaped (" next) { + gchar strbuf[G_ASCII_DTOSTR_BUF_SIZE]; GstTimedValue *value; value = (GstTimedValue *) tmp->data; append_escaped (str, g_markup_printf_escaped (" %" G_GUINT64_FORMAT - ":%f ", value->timestamp, value->value)); + ":%s ", value->timestamp, g_ascii_dtostr (strbuf, + G_ASCII_DTOSTR_BUF_SIZE, value->value))); } - setlocale (LC_NUMERIC, oldlocale); - g_free (oldlocale); append_escaped (str, g_markup_printf_escaped ("'/>\n")); } else GST_DEBUG ("control source not in [interpolation]"); -- 2.7.4