[vlc-commits] XCB/XVideo: fix flawed logic for adaptor selection
Rémi Denis-Courmont
git at videolan.org
Sat Dec 15 10:18:01 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Dec 14 21:30:41 2012 +0200| [45ab9b93592068dfb8380f6c99b062b1b7c34574] | committer: Rémi Denis-Courmont
XCB/XVideo: fix flawed logic for adaptor selection
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=45ab9b93592068dfb8380f6c99b062b1b7c34574
---
modules/video_output/xcb/xvideo.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index fedb271..32c966c 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -412,7 +412,8 @@ static int Open (vlc_object_t *obj)
if (adaptors == NULL)
goto error;
- int forced_adaptor = var_InheritInteger (obj, "xvideo-adaptor");
+ int adaptor_selected = var_InheritInteger (obj, "xvideo-adaptor");
+ int adaptor_current = -1;
/* */
video_format_t fmt;
@@ -426,12 +427,9 @@ static int Open (vlc_object_t *obj)
const xcb_xv_adaptor_info_t *a = it.data;
char *name;
- if (forced_adaptor != -1 && forced_adaptor != 0)
- {
- forced_adaptor--;
+ adaptor_current++;
+ if (adaptor_selected != -1 && adaptor_selected != adaptor_current)
continue;
- }
-
if (!(a->type & XCB_XV_TYPE_INPUT_MASK)
|| !(a->type & XCB_XV_TYPE_IMAGE_MASK))
continue;
More information about the vlc-commits
mailing list