ges-launch: make it portable to all locales.

Call setlocale (LC_ALL, "") as per setlocale man page
to make ges-launch portable to all locales (instead of default
"C" one).

Fixes g_option_context_parse on:
$ ges-launch-1.0 --verbose -r -q /home/prahal/Vidéos/Test3.xges -o
file:///home/prahal/Test3.mpeg
Error initializing: Invalid byte sequence in conversion input

The accentuated character in "Vidéos" the french xdg user directory
for "Videos" is what is choked upon.

https://bugzilla.gnome.org/show_bug.cgi?id=702425
This commit is contained in:
Alban Browaeys 2013-06-17 07:55:54 +02:00 committed by Sebastian Dröge
parent 3b8bfc1f16
commit 6a187e09dd

View file

@ -29,6 +29,8 @@
#include <ges/ges.h> #include <ges/ges.h>
#include <gst/pbutils/encoding-profile.h> #include <gst/pbutils/encoding-profile.h>
#include <locale.h> /* for LC_ALL */
/* GLOBAL VARIABLE */ /* GLOBAL VARIABLE */
static guint repeat = 0; static guint repeat = 0;
static GESTimelinePipeline *pipeline = NULL; static GESTimelinePipeline *pipeline = NULL;
@ -459,6 +461,8 @@ main (int argc, gchar ** argv)
GMainLoop *mainloop; GMainLoop *mainloop;
GstBus *bus; GstBus *bus;
setlocale (LC_ALL, "");
ctx = g_option_context_new ("- plays or renders a timeline."); ctx = g_option_context_new ("- plays or renders a timeline.");
g_option_context_set_summary (ctx, g_option_context_set_summary (ctx,
"ges-launch renders a timeline, which can be specified on the commandline,\n" "ges-launch renders a timeline, which can be specified on the commandline,\n"