[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:35:47 CET 2010


vlc/vlc-1.1 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Mon Nov 29 22:06:40 2010 +0200| [335126fac9729d0122f72591a324b4c7efde5339] | committer: Ilkka Ollakka 

projectm: quick fix to get projectm visualisation to work on all locales
(cherry picked from commit 3b9074b2edc6aabd9e6f6408a7e14625b9b86912)

Signed-off-by: Ilkka Ollakka <ileoo at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=335126fac9729d0122f72591a324b4c7efde5339
---

 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 90ca9c8..1dd0feb 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