From: Tim-Philipp Müller Date: Sun, 1 Sep 2013 23:19:30 +0000 (+0100) Subject: ges-xml-formatter: use g_ascii_dtostr() instead of messing with setlocale() X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73075e4637f0c6020ec26756506c23b9dadfafdf;p=platform%2Fupstream%2Fgst-editing-services.git ges-xml-formatter: use g_ascii_dtostr() instead of messing with setlocale() Libraries shouldn't use setlocale(). --- 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]");