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
e59154b3
Commit
e59154b3
authored
Mar 22, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vaapi: fix some memory leaks
parent
d8c0c2fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
modules/codec/avcodec/vaapi.c
modules/codec/avcodec/vaapi.c
+9
-7
No files found.
modules/codec/avcodec/vaapi.c
View file @
e59154b3
/*****************************************************************************
* vaapi.c: VAAPI helpers for the libavcodec decoder
*****************************************************************************
* Copyright (C) 2009 Laurent Aimar
*
$Id$
* Copyright (C) 2009
-2010
Laurent Aimar
*
Copyright (C) 2012-2014 Rémi Denis-Courmont
*
* Authors: Laurent Aimar <fenrir_AT_ videolan _DOT_ org>
*
...
...
@@ -218,7 +218,11 @@ static int Open( vlc_va_t *va, int i_codec_id, int i_thread_count )
return
VLC_SUCCESS
;
error:
#warning Leaks!
if
(
sys
->
p_display
!=
NULL
)
vaTerminate
(
sys
->
p_display
);
if
(
sys
->
p_display_x11
!=
NULL
)
XCloseDisplay
(
sys
->
p_display_x11
);
free
(
sys
);
return
VLC_EGENERIC
;
}
...
...
@@ -527,10 +531,8 @@ static void Close( vlc_va_sys_t *sys )
if
(
sys
->
i_config_id
!=
VA_INVALID_ID
)
vaDestroyConfig
(
sys
->
p_display
,
sys
->
i_config_id
);
if
(
sys
->
p_display
)
vaTerminate
(
sys
->
p_display
);
if
(
sys
->
p_display_x11
)
XCloseDisplay
(
sys
->
p_display_x11
);
vaTerminate
(
sys
->
p_display
);
XCloseDisplay
(
sys
->
p_display_x11
);
}
static
void
Delete
(
vlc_va_t
*
va
)
...
...
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