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
e2854b9e
Commit
e2854b9e
authored
Dec 06, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VAAPI-X11: cleanup Render() function a bit.
parent
5042a545
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
21 deletions
+19
-21
modules/codec/avcodec/vaapi_x11.c
modules/codec/avcodec/vaapi_x11.c
+19
-21
No files found.
modules/codec/avcodec/vaapi_x11.c
View file @
e2854b9e
...
...
@@ -1227,7 +1227,6 @@ cleanup:
/* Cannot reuse this cached subpicture */
msg_Warn
(
vd
,
"cannot reuse cached subpicture %d for surface %d -- resetting"
,
cache
->
i_id
,
surface
->
i_id
);
sys
->
render
.
prev_subpicture
=
NULL
;
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
return
VLC_EGENERIC
;
}
...
...
@@ -1258,36 +1257,35 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict
if
(
i_region
==
0
)
return
;
again:
/* same as previous subpicture? */
if
((
sys
->
render
.
prev_subpicture
==
subpicture
)
&&
(
sys
->
render
.
i_cache
>
0
))
{
if
(
RenderCachedSubpictures
(
vd
,
picture
,
subpicture
)
!
=
VLC_SUCCESS
)
goto
agai
n
;
if
(
RenderCachedSubpictures
(
vd
,
picture
,
subpicture
)
=
=
VLC_SUCCESS
)
retur
n
;
}
else
{
/* Release exra reference */
if
(
sys
->
render
.
i_cache
>
0
)
{
vlc_mutex_lock
(
&
sys
->
cache_lock
);
cache_SubpictureRelease
(
vd
,
sys
->
render
.
i_cache
);
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
}
/* render new subpicture */
if
(
RenderDirectSubpicture
(
vd
,
picture
,
subpicture
)
!=
VLC_SUCCESS
)
return
;
sys
->
render
.
prev_subpicture
=
subpicture
;
sys
->
render
.
i_start
=
subpicture
->
i_start
;
sys
->
render
.
i_stop
=
subpicture
->
i_stop
;
/* render new subpicture */
/* Hold extra reference */
/* Release exra reference */
if
(
sys
->
render
.
i_cache
>
0
)
{
vlc_mutex_lock
(
&
sys
->
cache_lock
);
cache_Subpicture
Hold
(
vd
,
sys
->
render
.
i_cache
);
cache_Subpicture
Release
(
vd
,
sys
->
render
.
i_cache
);
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
}
if
(
RenderDirectSubpicture
(
vd
,
picture
,
subpicture
)
!=
VLC_SUCCESS
)
return
;
sys
->
render
.
prev_subpicture
=
subpicture
;
sys
->
render
.
i_start
=
subpicture
->
i_start
;
sys
->
render
.
i_stop
=
subpicture
->
i_stop
;
/* Hold extra reference */
vlc_mutex_lock
(
&
sys
->
cache_lock
);
cache_SubpictureHold
(
vd
,
sys
->
render
.
i_cache
);
vlc_mutex_unlock
(
&
sys
->
cache_lock
);
}
static
void
DisplayVASurface
(
vout_display_t
*
vd
,
picture_t
*
picture
)
...
...
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