From c91ed016b1b49322ba11f71aa2b3dce1a18d88aa Mon Sep 17 00:00:00 2001 From: Vineeth TM Date: Wed, 29 Jul 2015 16:42:48 +0900 Subject: [PATCH] validate:tools: set locale to all and change argument to FILENAME When file name consists of characters from other languages, say korean, then it throws an error Error initializing: Invalid byte sequence in conversion input Hence setting locale to all to fix this. And changing the media-info argument to type G_OPTION_ARG_FILENAME https://bugzilla.gnome.org/show_bug.cgi?id=752945 --- validate/tools/gst-validate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/validate/tools/gst-validate.c b/validate/tools/gst-validate.c index f11dbbcc9a..5d70d2895e 100644 --- a/validate/tools/gst-validate.c +++ b/validate/tools/gst-validate.c @@ -38,6 +38,7 @@ #ifdef G_OS_UNIX #include #endif +#include /* for LC_ALL */ static gint ret = 0; static GMainLoop *mainloop; @@ -432,7 +433,7 @@ main (int argc, gchar ** argv) " if no parameter passed, it will list all avalaible action types" " otherwize will print the full description of the wanted types", NULL}, - {"set-media-info", '\0', 0, G_OPTION_ARG_STRING, &media_info, + {"set-media-info", '\0', 0, G_OPTION_ARG_FILENAME, &media_info, "Set a media_info XML file descriptor to share information about the" " media file that will be reproduced.", NULL}, @@ -449,6 +450,8 @@ main (int argc, gchar ** argv) GstValidateMonitor *monitor; GstBus *bus; + setlocale (LC_ALL, ""); + g_set_prgname ("gst-validate-" GST_API_VERSION); ctx = g_option_context_new ("PIPELINE-DESCRIPTION"); g_option_context_add_main_entries (ctx, options, NULL);