Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
09622ff6
Commit
09622ff6
authored
Apr 05, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codec/avcodec/vaapi: fix vlc_va_Initialize()
Return a pointer to vlc_va_conn_t.
parent
8f8b6c79
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
modules/codec/avcodec/va.c
modules/codec/avcodec/va.c
+6
-6
modules/codec/avcodec/va.h
modules/codec/avcodec/va.h
+1
-1
modules/codec/avcodec/vaapi.c
modules/codec/avcodec/vaapi.c
+2
-1
modules/codec/avcodec/vaapi_x11.c
modules/codec/avcodec/vaapi_x11.c
+2
-1
No files found.
modules/codec/avcodec/va.c
View file @
09622ff6
...
...
@@ -54,15 +54,15 @@ static vlc_va_conn_t *vlc_va_get_conn( void )
return
(
vlc_va_conn_t
*
)
&
vlc_va_conn
;
}
int
vlc_va_Initialize
(
vlc_va_conn_t
*
conn
,
const
char
*
display_name
)
vlc_va_conn_t
*
vlc_va_Initialize
(
const
char
*
display_name
)
{
static
bool
b_va_inited
=
false
;
assert
(
conn
==
NULL
);
/* connect global to caller */
conn
=
vlc_va_get_conn
();
vlc_va_conn_t
*
conn
=
vlc_va_get_conn
();
assert
(
conn
);
if
(
b_va_inited
)
return
VLC_SUCCESS
;
return
conn
;
/* Create a VA display */
conn
->
p_display_x11
=
XOpenDisplay
(
display_name
);
...
...
@@ -78,10 +78,10 @@ int vlc_va_Initialize( vlc_va_conn_t *conn, const char *display_name )
conn
->
i_ref_count
++
;
b_va_inited
=
true
;
return
VLC_SUCCESS
;
return
conn
;
error:
return
VLC_EGENERIC
;
return
NULL
;
}
void
vlc_va_Terminate
(
vlc_va_conn_t
*
conn
)
...
...
modules/codec/avcodec/va.h
View file @
09622ff6
...
...
@@ -77,7 +77,7 @@ struct vlc_va_conn_t
int
i_ref_count
;
/* for internal use only */
};
int
vlc_va_Initialize
(
vlc_va_conn_t
*
conn
,
const
char
*
display_name
);
vlc_va_conn_t
*
vlc_va_Initialize
(
const
char
*
display_name
);
void
vlc_va_Terminate
(
vlc_va_conn_t
*
conn
);
struct
picture_sys_t
...
...
modules/codec/avcodec/vaapi.c
View file @
09622ff6
...
...
@@ -128,7 +128,8 @@ static int Open( vlc_va_vaapi_t *p_va, int i_codec_id )
p_va
->
image
.
image_id
=
VA_INVALID_ID
;
/* Create a VA display */
if
(
vlc_va_Initialize
(
p_va
->
conn
,
NULL
)
!=
VLC_SUCCESS
)
p_va
->
conn
=
vlc_va_Initialize
(
NULL
);
if
(
!
p_va
->
conn
)
goto
error
;
/* Create a VA configuration */
...
...
modules/codec/avcodec/vaapi_x11.c
View file @
09622ff6
...
...
@@ -211,7 +211,8 @@ int OpenVaapiX11 (vlc_object_t *obj)
goto
error
;
/* Create a VA display */
if
(
vlc_va_Initialize
(
sys
->
conn
,
sys
->
embed
->
display
.
x11
)
!=
VLC_SUCCESS
)
sys
->
conn
=
vlc_va_Initialize
(
sys
->
embed
->
display
.
x11
);
if
(
!
sys
->
conn
)
goto
error
;
if
(
CreateWindow
(
vd
)
!=
VLC_SUCCESS
)
...
...
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