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

XCB/XVideo: minor simplification

parent fce4f9c4
...@@ -340,11 +340,11 @@ static int Open (vlc_object_t *obj) ...@@ -340,11 +340,11 @@ static int Open (vlc_object_t *obj)
/* */ /* */
video_format_t fmt = vd->fmt; video_format_t fmt = vd->fmt;
bool found_adaptor = false; p_sys->port = 0;
xcb_xv_adaptor_info_iterator_t it; xcb_xv_adaptor_info_iterator_t it;
for (it = xcb_xv_query_adaptors_info_iterator (adaptors); for (it = xcb_xv_query_adaptors_info_iterator (adaptors);
it.rem > 0 && !found_adaptor; it.rem > 0;
xcb_xv_adaptor_info_next (&it)) xcb_xv_adaptor_info_next (&it))
{ {
const xcb_xv_adaptor_info_t *a = it.data; const xcb_xv_adaptor_info_t *a = it.data;
...@@ -492,15 +492,15 @@ static int Open (vlc_object_t *obj) ...@@ -492,15 +492,15 @@ static int Open (vlc_object_t *obj)
} }
} }
xcb_xv_ungrab_port (conn, p_sys->port, XCB_CURRENT_TIME); xcb_xv_ungrab_port (conn, p_sys->port, XCB_CURRENT_TIME);
p_sys->port = 0;
msg_Dbg (vd, "no usable X11 visual"); msg_Dbg (vd, "no usable X11 visual");
continue; /* No workable XVideo format (visual/depth) */ continue; /* No workable XVideo format (visual/depth) */
created_window: created_window:
found_adaptor = true;
break; break;
} }
free (adaptors); free (adaptors);
if (!found_adaptor) if (!p_sys->port)
{ {
msg_Err (vd, "no available XVideo adaptor"); msg_Err (vd, "no available XVideo adaptor");
goto error; goto error;
......
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