Commit 52157cf5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

XCB/XVideo: fix flawed logic for adaptor selection

(cherry picked from commit 45ab9b93592068dfb8380f6c99b062b1b7c34574)
parent 0e00f5e4
......@@ -413,7 +413,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;
......@@ -427,12 +428,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment