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
1ea1c3f9
Commit
1ea1c3f9
authored
Nov 15, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB-XV: cosmetic, kill a few gotos
parent
df6af2ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
modules/video_output/xcb/xvideo.c
modules/video_output/xcb/xvideo.c
+16
-16
No files found.
modules/video_output/xcb/xvideo.c
View file @
1ea1c3f9
...
...
@@ -374,7 +374,7 @@ static int Open (vlc_object_t *obj)
chromas
=
chromas_default
;
vlc_fourcc_t
chroma
;
for
(
size_t
i
=
0
;
chromas
[
i
]
&&
(
xfmt
==
NULL
)
;
i
++
)
for
(
size_t
i
=
0
;
chromas
[
i
];
i
++
)
{
chroma
=
chromas
[
i
];
...
...
@@ -388,10 +388,22 @@ static int Open (vlc_object_t *obj)
}
xfmt
=
FindFormat
(
vd
,
chroma
,
&
fmt
,
a
->
base_id
,
r
,
&
p_sys
->
att
);
if
(
xfmt
!=
NULL
)
{
p_sys
->
id
=
xfmt
->
id
;
fmt
.
i_chroma
=
chroma
;
if
(
xfmt
->
type
==
XCB_XV_IMAGE_FORMAT_INFO_TYPE_RGB
)
{
fmt
.
i_rmask
=
xfmt
->
red_mask
;
fmt
.
i_gmask
=
xfmt
->
green_mask
;
fmt
.
i_bmask
=
xfmt
->
blue_mask
;
}
break
;
}
}
free
(
r
);
if
(
xfmt
==
NULL
)
/* No acceptable image formats */
goto
skip_adaptor
;
continue
;
/* Grab a port */
for
(
unsigned
i
=
0
;
i
<
a
->
num_ports
;
i
++
)
...
...
@@ -412,7 +424,7 @@ static int Open (vlc_object_t *obj)
msg_Dbg
(
vd
,
"cannot grab port %"
PRIu32
,
port
);
}
if
(
!
found_adaptor
)
goto
skip_adaptor
;
continue
;
/* Found port - initialize selected format */
name
=
strndup
(
xcb_xv_adaptor_info_name
(
a
),
a
->
name_size
);
...
...
@@ -422,19 +434,7 @@ static int Open (vlc_object_t *obj)
free
(
name
);
}
msg_Dbg
(
vd
,
"using port %"
PRIu32
,
p_sys
->
port
);
p_sys
->
id
=
xfmt
->
id
;
msg_Dbg
(
vd
,
"using image format 0x%"
PRIx32
,
p_sys
->
id
);
fmt
.
i_chroma
=
chroma
;
if
(
xfmt
->
type
==
XCB_XV_IMAGE_FORMAT_INFO_TYPE_RGB
)
{
fmt
.
i_rmask
=
xfmt
->
red_mask
;
fmt
.
i_gmask
=
xfmt
->
green_mask
;
fmt
.
i_bmask
=
xfmt
->
blue_mask
;
}
skip_adaptor:
free
(
r
);
}
free
(
adaptors
);
if
(
!
found_adaptor
)
...
...
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