Commit 335126fa authored by Ilkka Ollakka's avatar Ilkka Ollakka

projectm: quick fix to get projectm visualisation to work on all locales

(cherry picked from commit 3b9074b2edc6aabd9e6f6408a7e14625b9b86912)
Signed-off-by: default avatarIlkka Ollakka <ileoo@videolan.org>
parent 8fdaadb8
...@@ -292,6 +292,8 @@ static void *Thread( void *p_data ) ...@@ -292,6 +292,8 @@ static void *Thread( void *p_data )
vout_opengl_t *gl; vout_opengl_t *gl;
int i_last_width = 0; int i_last_width = 0;
int i_last_height = 0; int i_last_height = 0;
locale_t loc;
locale_t oldloc;
#ifdef HAVE_PROJECTM2 #ifdef HAVE_PROJECTM2
projectM::Settings settings; projectM::Settings settings;
#endif #endif
...@@ -339,6 +341,8 @@ static void *Thread( void *p_data ) ...@@ -339,6 +341,8 @@ static void *Thread( void *p_data )
goto error; goto error;
} }
loc = newlocale (LC_NUMERIC_MASK, "C", NULL);
oldloc = uselocale (loc);
/* Create the projectM object */ /* Create the projectM object */
#ifndef HAVE_PROJECTM2 #ifndef HAVE_PROJECTM2
p_sys->p_projectm = new projectM( p_sys->psz_config ); p_sys->p_projectm = new projectM( p_sys->psz_config );
...@@ -402,6 +406,11 @@ static void *Thread( void *p_data ) ...@@ -402,6 +406,11 @@ static void *Thread( void *p_data )
delete p_sys->p_projectm; delete p_sys->p_projectm;
vout_DeleteDisplay( p_sys->p_vd, NULL ); vout_DeleteDisplay( p_sys->p_vd, NULL );
vlc_object_release( p_sys->p_vout ); vlc_object_release( p_sys->p_vout );
if (loc != (locale_t)0)
{
uselocale (oldloc);
freelocale (loc);
}
return NULL; return NULL;
} }
vlc_mutex_unlock( &p_sys->lock ); vlc_mutex_unlock( &p_sys->lock );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment