Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
6aca96ae
Commit
6aca96ae
authored
Jul 24, 2013
by
Rémi Denis-Courmont
Browse files
vaapi: use AVFrame.opaque to store per-picture state directly
parent
51595991
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/codec/avcodec/vaapi.c
View file @
6aca96ae
...
...
@@ -513,23 +513,17 @@ static int Get( vlc_va_t *va, AVFrame *p_ff )
if
(
i
==
0
||
i
==
3
)
p_ff
->
data
[
i
]
=
(
void
*
)(
uintptr_t
)
p_surface
->
i_id
;
/* Yummie */
}
p_ff
->
opaque
=
p_surface
;
return
VLC_SUCCESS
;
}
static
void
Release
(
vlc_va_t
*
va
,
AVFrame
*
p_ff
)
{
vlc_va_sys_t
*
sys
=
va
->
sys
;
VASurfaceID
i_surface_id
=
(
VASurfaceID
)(
uintptr_t
)
p_ff
->
data
[
3
];
vlc_va_surface_t
*
p_surface
=
p_ff
->
opaque
;
vlc_mutex_lock
(
&
sys
->
lock
);
for
(
int
i
=
0
;
i
<
sys
->
i_surface_count
;
i
++
)
{
vlc_va_surface_t
*
p_surface
=
&
sys
->
p_surface
[
i
];
if
(
p_surface
->
i_id
==
i_surface_id
)
p_surface
->
i_refcount
--
;
}
p_surface
->
i_refcount
--
;
vlc_mutex_unlock
(
&
sys
->
lock
);
}
...
...
Write
Preview
Supports
Markdown
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