mirror of
https://github.com/mpv-player/mpv
synced 2024-12-18 21:06:00 +00:00
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
This commit is contained in:
parent
d80fc3aa45
commit
8c126714c5
@ -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
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
Loading…
Reference in New Issue
Block a user