Mercurial > mplayer.hg
changeset 8083:3aee0db04665
Fixed a bug which would prevent proper parsing of floating point
options when the locale used has a decimal point other than the dot
character (".").
Idea by Aleksander Adamowski <olo at altkom dor com dot pl>.
author | rguyom |
---|---|
date | Sun, 03 Nov 2002 15:14:31 +0000 |
parents | d630c877c05c |
children | c524ca26ace1 |
files | libmpcodecs/vf_unsharp.c |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vf_unsharp.c Sun Nov 03 14:49:45 2002 +0000 +++ b/libmpcodecs/vf_unsharp.c Sun Nov 03 15:14:31 2002 +0000 @@ -27,6 +27,10 @@ #include "../mp_msg.h" #include "../cpudetect.h" +#ifdef USE_SETLOCALE +#include <locale.h> +#endif + #ifdef HAVE_MALLOC_H #include <malloc.h> #endif @@ -265,7 +269,13 @@ // parse amount pos = strchr( pos+1, ':' ); +#ifdef USE_SETLOCALE + setlocale( LC_NUMERIC, "C" ); +#endif fp->amount = ( pos && pos+1<max ) ? atof( pos+1 ) : 0; +#ifdef USE_SETLOCALE + setlocale( LC_NUMERIC, "" ); +#endif } //===========================================================================//