diff options
author | Nemurimasu Neiro | 2010-09-06 00:04:56 +0000 |
---|---|---|
committer | McCabe Maxsted | 2010-09-10 19:01:19 -0700 |
commit | 45ae4881525730eece3298d3c88984ce0599a106 (patch) | |
tree | 7fd40b5eefb2eb9af2ce65dcc8c62203c65502fd /linden/indra | |
parent | Applied #472: teleport history from Emerald, patch by Ansariel Hiler, feature... (diff) | |
download | meta-impy-45ae4881525730eece3298d3c88984ce0599a106.zip meta-impy-45ae4881525730eece3298d3c88984ce0599a106.tar.gz meta-impy-45ae4881525730eece3298d3c88984ce0599a106.tar.bz2 meta-impy-45ae4881525730eece3298d3c88984ce0599a106.tar.xz |
use setenv instead of putenv
putenv requires that the string not be freed
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamer.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp index 2bfe4ea..7af9c9a 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp | |||
@@ -188,9 +188,6 @@ bool LLMediaImplGStreamer::startup (LLMediaManagerData* init_data) | |||
188 | // Protect against GStreamer resetting the locale, yuck. | 188 | // Protect against GStreamer resetting the locale, yuck. |
189 | static std::string saved_locale; | 189 | static std::string saved_locale; |
190 | saved_locale = setlocale(LC_ALL, NULL); | 190 | saved_locale = setlocale(LC_ALL, NULL); |
191 | #if LL_DARWIN | ||
192 | setenv("GST_PLUGIN_SYSTEM_PATH", "lib/gstreamer-plugins", TRUE); | ||
193 | #endif | ||
194 | if (0 == gst_init_check(NULL, NULL, NULL)) | 191 | if (0 == gst_init_check(NULL, NULL, NULL)) |
195 | { | 192 | { |
196 | LL_WARNS("MediaImpl") << "GStreamer library failed to initialize and load standard plugins." << LL_ENDL; | 193 | LL_WARNS("MediaImpl") << "GStreamer library failed to initialize and load standard plugins." << LL_ENDL; |
@@ -294,7 +291,6 @@ void LLMediaImplGStreamer::set_gst_plugin_path() | |||
294 | // Search both Imprudence and Imprudence\lib\gstreamer-plugins. | 291 | // Search both Imprudence and Imprudence\lib\gstreamer-plugins. |
295 | // But we also want to search the path the user has set, if any. | 292 | // But we also want to search the path the user has set, if any. |
296 | std::string plugin_path = | 293 | std::string plugin_path = |
297 | "GST_PLUGIN_PATH=" + | ||
298 | #if LL_WINDOWS | 294 | #if LL_WINDOWS |
299 | imp_dir + "\\lib\\gstreamer-plugins" + | 295 | imp_dir + "\\lib\\gstreamer-plugins" + |
300 | #elif LL_DARWIN | 296 | #elif LL_DARWIN |
@@ -307,9 +303,9 @@ void LLMediaImplGStreamer::set_gst_plugin_path() | |||
307 | 303 | ||
308 | // Place GST_PLUGIN_PATH in the environment settings | 304 | // Place GST_PLUGIN_PATH in the environment settings |
309 | #if LL_WINDOWS | 305 | #if LL_WINDOWS |
310 | put_result = _putenv( (char*)plugin_path.c_str() ); | 306 | put_result = _putenv_s( "GST_PLUGIN_PATH", (char*)plugin_path.c_str() ); |
311 | #elif LL_DARWIN | 307 | #elif LL_DARWIN |
312 | put_result = putenv( (char*)plugin_path.c_str() ); | 308 | put_result = setenv( "GST_PLUGIN_PATH", (char*)plugin_path.c_str(), 1 ); |
313 | #endif | 309 | #endif |
314 | 310 | ||
315 | if( put_result == -1 ) | 311 | if( put_result == -1 ) |
@@ -324,9 +320,9 @@ void LLMediaImplGStreamer::set_gst_plugin_path() | |||
324 | 320 | ||
325 | // Don't load system plugins. We only want to use ours, to avoid conflicts. | 321 | // Don't load system plugins. We only want to use ours, to avoid conflicts. |
326 | #if LL_WINDOWS | 322 | #if LL_WINDOWS |
327 | put_result = _putenv( "GST_PLUGIN_SYSTEM_PATH=\"\"" ); | 323 | put_result = _putenv_s( "GST_PLUGIN_SYSTEM_PATH", "" ); |
328 | #elif LL_DARWIN | 324 | #elif LL_DARWIN |
329 | put_result = putenv( "GST_PLUGIN_SYSTEM_PATH=\"\"" ); | 325 | put_result = setenv( "GST_PLUGIN_SYSTEM_PATH", "", 1 ); |
330 | #endif | 326 | #endif |
331 | 327 | ||
332 | if( put_result == -1 ) | 328 | if( put_result == -1 ) |