[vlc-commits] darwinvlc: fix automatic language selection (close #9914)

Felix Paul Kühne git at videolan.org
Sun Nov 24 20:35:31 CET 2013


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Nov 24 20:35:05 2013 +0100| [c6e4493dcdab713bc70d0efb2154d08dce57cde1] | committer: Felix Paul Kühne

darwinvlc: fix automatic language selection (close #9914)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c6e4493dcdab713bc70d0efb2154d08dce57cde1
---

 bin/darwinvlc.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/bin/darwinvlc.c b/bin/darwinvlc.c
index 33bb4f3..9bac3ca 100644
--- a/bin/darwinvlc.c
+++ b/bin/darwinvlc.c
@@ -185,9 +185,11 @@ int main( int i_argc, const char *ppsz_argv[] )
                 lang = (char *)malloc(maxSize);
                 CFStringGetCString(language, lang, maxSize - 1, kCFStringEncodingUTF8);
             }
-            char tmp[11];
-            snprintf(tmp, 11, "LANG=%s", lang);
-            putenv(tmp);
+            if (strncmp( lang, "auto", 4 )) {
+                char tmp[11];
+                snprintf(tmp, 11, "LANG=%s", lang);
+                putenv(tmp);
+            }
             CFRelease(language);
         }
     }



More information about the vlc-commits mailing list