File gstreamer-no-setlocale.patch of Package gstreamer-0_10

From 9326124581e65c7f4dc6a729f12c1dca77d564f3 Mon Sep 17 00:00:00 2001
From: Sebastian Drö<>
Date: Tue, 20 Nov 2012 11:56:12 +0000
Subject: gst: Don't set the locale in gst_init()

The function init_pre() in gstreamer/gst/gst.c calls setlocale(LC_ALL, ""),
which sets the locale to the values specified in the environment.  This is
wrong for two reasons:

1. It is absolutely not the task of a library to decide on the correct locale
for a program.  Some programs change the locale for various (good or bad)
reasons, and libraries should respect that.  Programs where GStreamer's
overwriting of the locale causes bugs include Emacs [1, 2], Sublime Text [3],
and Lua [4].


Note that setting the locale can cause problems for programs that are not even
linked against GStreamer.  In the case of Emacs, for example, GStreamer seems
to be initialized through GTK via libcanberra.

2. Setting the locale is not thread-safe, and therefore should not be done in a
Index: gstreamer-0.10.36/gst/gst.c
--- gstreamer-0.10.36.orig/gst/gst.c
+++ gstreamer-0.10.36/gst/gst.c
@@ -588,7 +588,6 @@ init_pre (GOptionContext * context, GOpt
   _gst_debug_init ();
 #ifdef ENABLE_NLS
-  setlocale (LC_ALL, "");
   bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 #endif /* ENABLE_NLS */