Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
77db2e04
Commit
77db2e04
authored
Oct 04, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vdpau: fix VRAM leak on error
(cherry picked from commit 5bf47e957dfb794dfb96acb9c928fc8d87205d35)
parent
5cca79e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
modules/hw/vdpau/avcodec.c
modules/hw/vdpau/avcodec.c
+11
-3
No files found.
modules/hw/vdpau/avcodec.c
View file @
77db2e04
...
@@ -60,7 +60,7 @@ struct vlc_va_sys_t
...
@@ -60,7 +60,7 @@ struct vlc_va_sys_t
uint16_t
height
;
uint16_t
height
;
};
};
static
int
Lock
(
vlc_va_t
*
va
,
void
**
opaque
,
uint8_t
**
dat
a
)
static
vlc_vdp_video_field_t
*
CreateSurface
(
vlc_va_t
*
v
a
)
{
{
vlc_va_sys_t
*
sys
=
va
->
sys
;
vlc_va_sys_t
*
sys
=
va
->
sys
;
VdpVideoSurface
surface
;
VdpVideoSurface
surface
;
...
@@ -72,15 +72,23 @@ static int Lock(vlc_va_t *va, void **opaque, uint8_t **data)
...
@@ -72,15 +72,23 @@ static int Lock(vlc_va_t *va, void **opaque, uint8_t **data)
{
{
msg_Err
(
va
,
"%s creation failure: %s"
,
"video surface"
,
msg_Err
(
va
,
"%s creation failure: %s"
,
"video surface"
,
vdp_get_error_string
(
sys
->
vdp
,
err
));
vdp_get_error_string
(
sys
->
vdp
,
err
));
return
VLC_EGENERIC
;
return
NULL
;
}
}
vlc_vdp_video_field_t
*
field
=
vlc_vdp_video_create
(
sys
->
vdp
,
surface
);
vlc_vdp_video_field_t
*
field
=
vlc_vdp_video_create
(
sys
->
vdp
,
surface
);
if
(
unlikely
(
field
==
NULL
))
vdp_video_surface_destroy
(
sys
->
vdp
,
surface
);
return
field
;
}
static
int
Lock
(
vlc_va_t
*
va
,
void
**
opaque
,
uint8_t
**
data
)
{
vlc_vdp_video_field_t
*
field
=
CreateSurface
(
va
);
if
(
unlikely
(
field
==
NULL
))
if
(
unlikely
(
field
==
NULL
))
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
*
data
=
(
void
*
)(
uintptr_t
)
surface
;
*
opaque
=
field
;
*
opaque
=
field
;
*
data
=
(
void
*
)(
uintptr_t
)
field
->
frame
->
surface
;
return
VLC_SUCCESS
;
return
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