[vlc-commits] commit: projectm: quick fix to get projectm visualisation to work on all locales ( Ilkka Ollakka )
git at videolan.org
git at videolan.org
Mon Nov 29 21:17:32 CET 2010
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Mon Nov 29 22:06:40 2010 +0200| [3b9074b2edc6aabd9e6f6408a7e14625b9b86912] | committer: Ilkka Ollakka
projectm: quick fix to get projectm visualisation to work on all locales
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3b9074b2edc6aabd9e6f6408a7e14625b9b86912
---
modules/visualization/projectm.cpp | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/modules/visualization/projectm.cpp b/modules/visualization/projectm.cpp
index 84b3ff8..be2677f 100644
--- a/modules/visualization/projectm.cpp
+++ b/modules/visualization/projectm.cpp
@@ -292,6 +292,8 @@ static void *Thread( void *p_data )
vout_opengl_t *gl;
int i_last_width = 0;
int i_last_height = 0;
+ locale_t loc;
+ locale_t oldloc;
#ifdef HAVE_PROJECTM2
projectM::Settings settings;
#endif
@@ -339,6 +341,8 @@ static void *Thread( void *p_data )
goto error;
}
+ loc = newlocale (LC_NUMERIC_MASK, "C", NULL);
+ oldloc = uselocale (loc);
/* Create the projectM object */
#ifndef HAVE_PROJECTM2
p_sys->p_projectm = new projectM( p_sys->psz_config );
@@ -402,6 +406,11 @@ static void *Thread( void *p_data )
delete p_sys->p_projectm;
vout_DeleteDisplay( p_sys->p_vd, NULL );
vlc_object_release( p_sys->p_vout );
+ if (loc != (locale_t)0)
+ {
+ uselocale (oldloc);
+ freelocale (loc);
+ }
return NULL;
}
vlc_mutex_unlock( &p_sys->lock );
More information about the vlc-commits
mailing list