diff -Naur orig/libvo/video_out.c main/libvo/video_out.c --- orig/libvo/video_out.c 2004-12-10 14:17:28.000000000 +0100 +++ main/libvo/video_out.c 2004-12-16 22:42:32.332426520 +0100 @@ -49,7 +49,6 @@ int vo_pts=0; // for hw decoding float vo_fps=0; // for mp1e rte -char *vo_subdevice = NULL; int vo_directrendering=0; int vo_colorkey = 0x0000ff00; // default colorkey is green @@ -262,6 +261,8 @@ vo_functions_t* init_best_video_out(char** vo_list){ int i; + char *vo_subdevice = NULL; + // first try the preferred drivers, with their optional subdevice param: if(vo_list && vo_list[0]) while(vo_list[0][0]){ diff -Naur orig/libvo/video_out.h main/libvo/video_out.h --- orig/libvo/video_out.h 2004-11-02 17:08:44.000000000 +0100 +++ main/libvo/video_out.h 2004-12-16 22:49:19.431538048 +0100 @@ -216,8 +216,6 @@ extern int vo_pts; extern float vo_fps; -extern char *vo_subdevice; - extern int vo_colorkey; #if defined(HAVE_FBDEV)||defined(HAVE_VESA) diff -Naur orig/libvo/vo_dfbmga.c main/libvo/vo_dfbmga.c --- orig/libvo/vo_dfbmga.c 2004-11-02 17:08:44.000000000 +0100 +++ main/libvo/vo_dfbmga.c 2004-12-16 22:45:17.125374184 +0100 @@ -239,102 +239,102 @@ use_input = !getenv( "DISPLAY" ); - if (vo_subdevice) { + if (arg) { int show_help = 0; int opt_no = 0; - while (*vo_subdevice != '\0') { - if (!strncmp(vo_subdevice, "bes", 3)) { + while (*arg != '\0') { + if (!strncmp(arg, "bes", 3)) { use_bes = !opt_no; - vo_subdevice += 3; + arg += 3; opt_no = 0; - } else if (!strncmp(vo_subdevice, "crtc2", 5)) { + } else if (!strncmp(arg, "crtc2", 5)) { use_crtc2 = !opt_no; - vo_subdevice += 5; + arg += 5; opt_no = 0; - } else if (!strncmp(vo_subdevice, "spic", 4)) { + } else if (!strncmp(arg, "spic", 4)) { use_spic = !opt_no; - vo_subdevice += 4; + arg += 4; opt_no = 0; - } else if (!strncmp(vo_subdevice, "input", 5)) { + } else if (!strncmp(arg, "input", 5)) { force_input = !opt_no; - vo_subdevice += 5; + arg += 5; opt_no = 0; - } else if (!strncmp(vo_subdevice, "buffermode=", 11)) { + } else if (!strncmp(arg, "buffermode=", 11)) { if (opt_no) { show_help = 1; break; } - vo_subdevice += 11; - if (!strncmp(vo_subdevice, "single", 6)) { + arg += 11; + if (!strncmp(arg, "single", 6)) { buffermode = DLBM_FRONTONLY; osd_max = 1; flipping = 0; - vo_subdevice += 6; - } else if (!strncmp(vo_subdevice, "double", 6)) { + arg += 6; + } else if (!strncmp(arg, "double", 6)) { buffermode = DLBM_BACKVIDEO; osd_max = 2; flipping = 1; - vo_subdevice += 6; - } else if (!strncmp(vo_subdevice, "triple", 6)) { + arg += 6; + } else if (!strncmp(arg, "triple", 6)) { buffermode = DLBM_TRIPLE; osd_max = 4; flipping = 1; - vo_subdevice += 6; + arg += 6; } else { show_help = 1; break; } opt_no = 0; - } else if (!strncmp(vo_subdevice, "fieldparity=", 12)) { + } else if (!strncmp(arg, "fieldparity=", 12)) { if (opt_no) { show_help = 1; break; } - vo_subdevice += 12; - if (!strncmp(vo_subdevice, "top", 3)) { + arg += 12; + if (!strncmp(arg, "top", 3)) { field_parity = 0; - vo_subdevice += 3; - } else if (!strncmp(vo_subdevice, "bottom", 6)) { + arg += 3; + } else if (!strncmp(arg, "bottom", 6)) { field_parity = 1; - vo_subdevice += 6; + arg += 6; } else { show_help = 1; break; } opt_no = 0; - } else if (!strncmp(vo_subdevice, "tvnorm=", 7)) { + } else if (!strncmp(arg, "tvnorm=", 7)) { if (opt_no) { show_help = 1; break; } - vo_subdevice += 7; - if (!strncmp(vo_subdevice, "pal", 3)) { + arg += 7; + if (!strncmp(arg, "pal", 3)) { tvnorm = 0; - vo_subdevice += 3; - } else if (!strncmp(vo_subdevice, "ntsc" , 4)) { + arg += 3; + } else if (!strncmp(arg, "ntsc" , 4)) { tvnorm = 1; - vo_subdevice += 4; - } else if (!strncmp(vo_subdevice, "auto" , 4)) { + arg += 4; + } else if (!strncmp(arg, "auto" , 4)) { tvnorm = 2; - vo_subdevice += 4; + arg += 4; } else { show_help = 1; break; } opt_no = 0; - } else if (!strncmp(vo_subdevice, "no", 2)) { + } else if (!strncmp(arg, "no", 2)) { if (opt_no) { show_help = 1; break; } - vo_subdevice += 2; + arg += 2; opt_no = 1; - } else if (*vo_subdevice == ':') { + } else if (*arg == ':') { if (opt_no) { show_help = 1; break; } - vo_subdevice++; + arg++; opt_no = 0; } else { show_help = 1; diff -Naur orig/libvo/vo_directfb2.c main/libvo/vo_directfb2.c --- orig/libvo/vo_directfb2.c 2004-11-02 17:08:46.000000000 +0100 +++ main/libvo/vo_directfb2.c 2004-12-16 22:44:04.775373056 +0100 @@ -156,59 +156,59 @@ // config stuff - borrowed from dfbmga (to be as compatible as it could be :-) - if (vo_subdevice) { + if (arg) { int show_help = 0; int opt_no = 0; - while (*vo_subdevice != '\0') { - if (!strncmp(vo_subdevice, "input", 5)) { + while (*arg != '\0') { + if (!strncmp(arg, "input", 5)) { use_input = !opt_no; - vo_subdevice += 5; + arg += 5; opt_no = 0; - } else if (!strncmp(vo_subdevice, "buffermode=", 11)) { + } else if (!strncmp(arg, "buffermode=", 11)) { if (opt_no) { show_help = 1; break; } - vo_subdevice += 11; - if (!strncmp(vo_subdevice, "single", 6)) { + arg += 11; + if (!strncmp(arg, "single", 6)) { buffer_mode = 1; - vo_subdevice += 6; - } else if (!strncmp(vo_subdevice, "double", 6)) { + arg += 6; + } else if (!strncmp(arg, "double", 6)) { buffer_mode = 2; - vo_subdevice += 6; - } else if (!strncmp(vo_subdevice, "triple", 6)) { + arg += 6; + } else if (!strncmp(arg, "triple", 6)) { buffer_mode = 3; - vo_subdevice += 6; + arg += 6; } else { show_help = 1; break; } opt_no = 0; - } else if (!strncmp(vo_subdevice, "fieldparity=", 12)) { + } else if (!strncmp(arg, "fieldparity=", 12)) { if (opt_no) { show_help = 1; break; } - vo_subdevice += 12; - if (!strncmp(vo_subdevice, "top", 3)) { + arg += 12; + if (!strncmp(arg, "top", 3)) { field_parity = 0; - vo_subdevice += 3; - } else if (!strncmp(vo_subdevice, "bottom", 6)) { + arg += 3; + } else if (!strncmp(arg, "bottom", 6)) { field_parity = 1; - vo_subdevice += 6; + arg += 6; } else { show_help = 1; break; } opt_no = 0; - } else if (!strncmp(vo_subdevice, "layer=", 6)) { + } else if (!strncmp(arg, "layer=", 6)) { int tmp=-1; if (opt_no) { show_help = 1; break; } - vo_subdevice += 6; - if (sscanf(vo_subdevice,"%i",&tmp)) { + arg += 6; + if (sscanf(arg,"%i",&tmp)) { layer_id=tmp; mp_msg(MSGT_VO, MSGL_INFO,"DirectFB: Layer id is forced to %i\n",layer_id); } else { @@ -216,26 +216,26 @@ break; } opt_no = 0; - } else if (!strncmp(vo_subdevice, "no", 2)) { + } else if (!strncmp(arg, "no", 2)) { if (opt_no) { show_help = 1; break; } - vo_subdevice += 2; + arg += 2; opt_no = 1; - } else if (*vo_subdevice == ':') { + } else if (*arg == ':') { if (opt_no) { show_help = 1; break; } - vo_subdevice++; + arg++; opt_no = 0; - } else if (!strncmp(vo_subdevice, "help", 4)) { + } else if (!strncmp(arg, "help", 4)) { show_help = 1; - vo_subdevice += 4; + arg += 4; break; } else { - vo_subdevice++; + arg++; } } diff -Naur orig/libvo/vo_sdl.c main/libvo/vo_sdl.c --- orig/libvo/vo_sdl.c 2004-11-02 17:08:46.000000000 +0100 +++ main/libvo/vo_sdl.c 2004-12-16 22:46:08.720530528 +0100 @@ -1601,7 +1601,7 @@ if(verbose > 2) printf("SDL: Opening Plugin\n"); - if(vo_subdevice) setenv("SDL_VIDEODRIVER", vo_subdevice, 1); + if(arg) setenv("SDL_VIDEODRIVER", arg, 1); /* does the user want SDL to try and force Xv */ if(sdl_forcexv) setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "1", 1); diff -Naur orig/mplayer.c main/mplayer.c --- orig/mplayer.c 2004-12-16 17:55:06.000000000 +0100 +++ main/mplayer.c 2004-12-16 22:47:27.247592600 +0100 @@ -284,7 +284,6 @@ char** video_driver_list=NULL; char** audio_driver_list=NULL; -extern char *vo_subdevice; extern char *ao_subdevice; // codec outfmt flags (defined in libmpcodecs/vd.c)