diff options
author | rguyom <rguyom@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-03 15:14:31 +0000 |
---|---|---|
committer | rguyom <rguyom@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-03 15:14:31 +0000 |
commit | 8c126714c54141fd172ae565ec2a082f48b8f8d2 (patch) | |
tree | eb129b16dfb319acf46c5dd2d7eebee618f43cd1 | |
parent | d80fc3aa4571cb2cdfc5e2fec6eb34b22466efaf (diff) |
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>.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8084 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpcodecs/vf_unsharp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libmpcodecs/vf_unsharp.c b/libmpcodecs/vf_unsharp.c index f504d4dd36..7a2384cf18 100644 --- a/libmpcodecs/vf_unsharp.c +++ b/libmpcodecs/vf_unsharp.c @@ -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 @@ static void parse( FilterParam *fp, char* args ) { // 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 } //===========================================================================// |