Use C locale when reading ReplayGain tag
authorUlrich Klauer <ulrich@chirlu.de>
Thu, 11 Apr 2013 20:07:49 +0000 (22:07 +0200)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Mon, 29 Apr 2013 23:48:44 +0000 (09:48 +1000)
commitaa285f3ac18a9825e9081af87545c8406e10f2d1
treeacd8d7df87112db34fa25dd94dd18b66b9c4af13
parentc1ebd2caa4331132dc039b92fb1971b962354df3
Use C locale when reading ReplayGain tag

When a locale is in effect that does not use the point as the decimal
mark (e.g., sv_SE or de_DE, which use a comma) and a ReplayGain tag is
read for --apply-replaygain-which-is-not-lossless, the gain value was
misinterpreted (e.g., "-2.29" truncated to "-2"). This is fixed by
resetting the locale to "C" temporarily, based on Josh Coalson's fix
of the dual case (writing ReplayGain tag) in commit cda02d3.

Patch by hhaamu@gmail.com, taken from the Debian patch tracker for
flac 1.2.1-6 (13_replaygain_c_locale.patch).

http://sourceforge.net/p/flac/bugs/380/

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
src/share/grabbag/replaygain.c