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
57c5e16c
Commit
57c5e16c
authored
May 24, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codec/avcodec/vaapi_x11.c: Potential picture leaks.
- do picture refcounting from pf_release() functions.
parent
707d7b50
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
modules/codec/avcodec/vaapi_x11.c
modules/codec/avcodec/vaapi_x11.c
+10
-2
No files found.
modules/codec/avcodec/vaapi_x11.c
View file @
57c5e16c
...
...
@@ -691,6 +691,8 @@ static int RenderDirectSubpicture(vout_display_t *vd, picture_t *picture, subpic
static
void
PictureRelease
(
picture_t
*
picture
)
{
if
(
picture
->
i_refcount
>
0
)
picture
->
i_refcount
--
;
free
(
picture
->
p_sys
);
picture
->
p_sys
=
NULL
;
}
...
...
@@ -700,6 +702,9 @@ static void PictureReleaseVoutOwned(picture_t *picture)
if
(
!
picture
->
p_sys
->
b_own_vout
)
abort
();
if
(
picture
->
i_refcount
>
0
)
picture
->
i_refcount
--
;
vlc_va_surface_t
*
surface
=
picture
->
p_sys
->
surface
;
#if 0
/* FIXME: pictures discarded by core will leak VASurfaces */
...
...
@@ -726,12 +731,13 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict
picture
->
p_sys
=
RenderImportPicture
(
vd
,
picture
);
if
(
!
picture
->
p_sys
)
return
;
assert
(
picture
->
p_sys
->
surface
);
assert
(
picture
->
pf_release
);
picture
->
pf_release
=
PictureReleaseVoutOwned
;
}
if
(
picture
->
p_sys
->
surface
==
NULL
)
abort
()
;
return
;
vlc_mutex_lock
(
&
picture
->
p_sys
->
surface
->
lock
);
...
...
@@ -757,6 +763,7 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict
static
void
ReleaseSurfaceLocked
(
vlc_va_surface_t
*
surface
)
{
if
(
surface
->
i_refcount
>
0
)
surface
->
i_refcount
--
;
assert
(
surface
->
i_refcount
>=
0
);
}
...
...
@@ -797,6 +804,7 @@ static void DisplayPicture(vout_display_t *vd, picture_t *pic, subpicture_t *sub
if
(
pic
->
p_sys
->
surface
==
NULL
)
{
assert
(
!
pic
->
p_sys
->
b_own_vout
);
msg_Err
(
vd
,
"Discarding picture without surface information"
);
if
(
subpicture
)
subpicture_Delete
(
subpicture
);
...
...
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