changeset 14876:2b14e57570a8

10l Don't set SDL to X11 by default.
author ivo
date Tue, 01 Mar 2005 19:59:20 +0000
parents 5ce2aca02b92
children db1f17e9b7a2
files DOCS/man/en/mplayer.1 libvo/vo_sdl.c
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Tue Mar 01 18:09:22 2005 +0000
+++ b/DOCS/man/en/mplayer.1	Tue Mar 01 19:59:20 2005 +0000
@@ -2418,7 +2418,7 @@
 .PD 0
 .RSs
 .IPs driver=<driver>
-Explicitly choose the SDL driver to use (default: x11).
+Explicitly choose the SDL driver to use.
 .IPs (no)forcexv
 Use XVideo through the sdl video output driver (default: forcexv).
 .IPs (no)hwaccel
--- a/libvo/vo_sdl.c	Tue Mar 01 18:09:22 2005 +0000
+++ b/libvo/vo_sdl.c	Tue Mar 01 19:59:20 2005 +0000
@@ -1593,7 +1593,7 @@
 static uint32_t preinit(const char *arg)
 {
     struct sdl_priv_s *priv = &sdl_priv;
-    char * sdl_driver;
+    char * sdl_driver = NULL;
     int sdl_hwaccel;
     int sdl_forcexv;
     opt_t subopts[] = {
@@ -1605,7 +1605,6 @@
 
     sdl_forcexv = 1;
     sdl_hwaccel = 1;
-    sdl_driver = strdup("x11");
 
     if (subopt_parse(arg, subopts) != 0) return -1;
 
@@ -1615,8 +1614,10 @@
 
     if(verbose > 2) printf("SDL: Opening Plugin\n");
 
-    if(sdl_driver) setenv("SDL_VIDEODRIVER", sdl_driver, 1);
+    if(sdl_driver) {
+        setenv("SDL_VIDEODRIVER", sdl_driver, 1);
     free(sdl_driver);
+    }
 
     /* does the user want SDL to try and force Xv */
     if(sdl_forcexv)	setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "1", 1);