[gstreamer-bugs] [Bug 423051] New: Vorbis tags of type double use locale-dependent formatting

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Mon Mar 26 12:50:43 PDT 2007


Do NOT reply to this via email (we are currently unable to handle email
responses and they WILL be discarded).

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=423051.
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

  GStreamer | gst-plugins-base | Ver: HEAD CVS

           Summary: Vorbis tags of type double use locale-dependent
                    formatting
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Severity: minor
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: mail at renestadler.de
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


gst-plugins-base/gst-libs/gst/tag/gstvorbistag.c:gst_tag_to_vorbis_comments
contains this:

  /* FIXME: what about locale-specific floating point separators? */
  result = g_strdup_printf ("%s=%f", vorbis_tag, value);

This results in values of double type tags (ReplayGain) being possibly written
out with "," as a decimal separator.  I'm attaching a simple patch that
replaces this with

  g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f", value);
  result = g_strconcat (vorbis_tag, "=", buf, NULL);

This also uses at most 6 digits after the decimal point (using g_ascii_dtostr
here seems like overkill indeed) but formats the value irregardless of the
current locale.




More information about the Gstreamer-bugs mailing list