]> git.sesse.net Git - vlc/blobdiff - bin/vlc.c
Always use the SIGPIPE hack even if not needed, it cannot hurt
[vlc] / bin / vlc.c
index 1c64656a23377d4ec67ec4451b1c7250a7feb605..5d6fec3502f6f8a9fccf05d7f10a647aded7ef81 100644 (file)
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -54,11 +54,12 @@ extern char *FromLocale (const char *);
  *****************************************************************************/
 int main( int i_argc, const char *ppsz_argv[] )
 {
-#ifdef __APPLE__
-    /* The so-called POSIX-compliant MacOS X is not. 
-     * SIGPIPE fires even when it is blocked in all threads! */
+    /* The so-called POSIX-compliant MacOS X reportedly processes SIGPIPE even
+     * if it is blocked in all thread. Also some libraries want SIGPIPE blocked
+     * as they have no clue about signal masks.
+     * Note: this is NOT an excuse for not protecting against SIGPIPE. If
+     * LibVLC runs outside of VLC, we cannot rely on this code snippet. */
     signal (SIGPIPE, SIG_IGN);
-#endif
 
 #ifndef ALLOW_RUN_AS_ROOT
     if (geteuid () == 0)
@@ -89,6 +90,10 @@ int main( int i_argc, const char *ppsz_argv[] )
 #   endif
 #endif
 
+    /* Make Xlib hide visuals with an alphachannel. Ensure that Qt4 will not
+     * use the alpha channel for the embedded video window. */
+    putenv( (char *)"XLIB_SKIP_ARGB_VISUALS=1" );
+
     /* Synchronously intercepted POSIX signals.
      *
      * In a threaded program such as VLC, the only sane way to handle signals