Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
9e9028cd
Commit
9e9028cd
authored
Apr 23, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB/XVideo: return correct number of adaptors (fixes #11235)
parent
40c8c1a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
13 deletions
+19
-13
modules/video_output/xcb/xvideo.c
modules/video_output/xcb/xvideo.c
+19
-13
No files found.
modules/video_output/xcb/xvideo.c
View file @
9e9028cd
...
...
@@ -824,8 +824,6 @@ static void Manage (vout_display_t *vd)
static
int
EnumAdaptors
(
vlc_object_t
*
obj
,
const
char
*
var
,
int64_t
**
vp
,
char
***
tp
)
{
size_t
n
=
0
;
/* Connect to X */
char
*
display
=
var_InheritString
(
obj
,
"x11-display"
);
xcb_connection_t
*
conn
;
...
...
@@ -834,7 +832,7 @@ static int EnumAdaptors (vlc_object_t *obj, const char *var,
conn
=
xcb_connect
(
display
,
&
snum
);
free
(
display
);
if
(
xcb_connection_has_error
(
conn
)
/*== NULL*/
)
goto
error
;
return
-
1
;
/* Find configured screen */
const
xcb_setup_t
*
setup
=
xcb_get_setup
(
conn
);
...
...
@@ -849,33 +847,43 @@ static int EnumAdaptors (vlc_object_t *obj, const char *var,
}
snum
--
;
}
if
(
scr
==
NULL
)
goto
error
;
{
xcb_disconnect
(
conn
);
return
-
1
;
}
xcb_xv_query_adaptors_reply_t
*
adaptors
=
xcb_xv_query_adaptors_reply
(
conn
,
xcb_xv_query_adaptors
(
conn
,
scr
->
root
),
NULL
);
xcb_disconnect
(
conn
);
if
(
adaptors
==
NULL
)
goto
error
;
return
-
1
;
xcb_xv_adaptor_info_iterator_t
it
;
size_t
n
=
0
;
for
(
it
=
xcb_xv_query_adaptors_info_iterator
(
adaptors
);
it
.
rem
>
0
;
xcb_xv_adaptor_info_next
(
&
it
))
n
++
;
{
const
xcb_xv_adaptor_info_t
*
a
=
it
.
data
;
if
((
a
->
type
&
XCB_XV_TYPE_INPUT_MASK
)
&&
(
a
->
type
&
XCB_XV_TYPE_IMAGE_MASK
))
n
++
;
}
int64_t
*
values
=
xmalloc
((
n
+
1
)
*
sizeof
(
*
values
));
char
**
texts
=
xmalloc
((
n
+
1
)
*
sizeof
(
*
texts
));
*
vp
=
values
;
*
tp
=
texts
;
n
=
0
;
*
(
values
++
)
=
-
1
;
*
(
texts
++
)
=
strdup
(
N_
(
"Auto"
));
n
++
;
for
(
it
=
xcb_xv_query_adaptors_info_iterator
(
adaptors
);
for
(
it
=
xcb_xv_query_adaptors_info_iterator
(
adaptors
)
,
n
=
-
1
;
it
.
rem
>
0
;
xcb_xv_adaptor_info_next
(
&
it
))
{
...
...
@@ -887,12 +895,10 @@ static int EnumAdaptors (vlc_object_t *obj, const char *var,
||
!
(
a
->
type
&
XCB_XV_TYPE_IMAGE_MASK
))
continue
;
*
(
values
++
)
=
n
-
2
;
*
(
values
++
)
=
n
;
*
(
texts
++
)
=
strndup
(
xcb_xv_adaptor_info_name
(
a
),
a
->
name_size
);
}
free
(
adaptors
);
error:
xcb_disconnect
(
conn
);
(
void
)
obj
;
(
void
)
var
;
return
n
;
return
values
-
*
vp
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment