[Mplayer-cvslog] CVS: main/libmpcodecs vf_unsharp.c,1.2,1.3

Rémi Guyomarch CVS rguyom at mplayerhq.hu
Sun Nov 3 16:14:45 CET 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv20107/libmpcodecs

Modified Files:
	vf_unsharp.c 
Log Message:

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>.



Index: vf_unsharp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_unsharp.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_unsharp.c	1 Nov 2002 00:02:52 -0000	1.2
+++ vf_unsharp.c	3 Nov 2002 15:14:31 -0000	1.3
@@ -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
 }
 
 //===========================================================================//




More information about the MPlayer-cvslog mailing list