diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-02-25 18:53:19 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-02-25 18:53:19 +0000 |
commit | e15dfd5952406f62cbceec59114920c8b758524e (patch) | |
tree | b1f23d0abc5513891503be58759615f491cc5abe /src/video_out/video_out_xv.c | |
parent | dff9fc9bb1e3a5593c8dcc1c77116d1647b9af99 (diff) | |
download | xine-lib-e15dfd5952406f62cbceec59114920c8b758524e.tar.gz xine-lib-e15dfd5952406f62cbceec59114920c8b758524e.tar.bz2 |
When auto-detecting Xv ports, prefer port nos. >= configured.
Diffstat (limited to 'src/video_out/video_out_xv.c')
-rw-r--r-- | src/video_out/video_out_xv.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 115489e57..bc5928c25 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -1161,14 +1161,15 @@ xv_find_adaptor_by_port (int port, unsigned int adaptors, static XvPortID xv_autodetect_port(xv_driver_t *this, unsigned int adaptors, XvAdaptorInfo *adaptor_info, - unsigned int *adaptor_num) { + unsigned int *adaptor_num, + XvPortID base) { unsigned int an, j; for (an = 0; an < adaptors; an++) if (adaptor_info[an].type & XvImageMask) for (j = 0; j < adaptor_info[an].num_ports; j++) { XvPortID port = adaptor_info[an].base_id + j; - if (xv_open_port(this, port)) { + if (port >= base && xv_open_port(this, port)) { *adaptor_num = an; return port; } @@ -1241,11 +1242,12 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * xprintf(class->xine, XINE_VERBOSITY_NONE, _("%s: could not open Xv port %d - autodetecting\n"), LOG_MODULE, xv_port); - xv_port = xv_autodetect_port(this, adaptors, adaptor_info, &adaptor_num); + xv_port = xv_autodetect_port(this, adaptors, adaptor_info, &adaptor_num, xv_port); } else adaptor_num = xv_find_adaptor_by_port (xv_port, adaptors, adaptor_info); - } else - xv_port = xv_autodetect_port(this, adaptors, adaptor_info, &adaptor_num); + } + if (!xv_port) + xv_port = xv_autodetect_port(this, adaptors, adaptor_info, &adaptor_num, 0); if (!xv_port) { xprintf(class->xine, XINE_VERBOSITY_LOG, |