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
81b4850d
Commit
81b4850d
authored
Jul 14, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kva: fix double free on error, and remove useless struct member
parent
828af6fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
22 deletions
+10
-22
modules/video_output/kva.c
modules/video_output/kva.c
+10
-22
No files found.
modules/video_output/kva.c
View file @
81b4850d
...
...
@@ -101,7 +101,6 @@ struct vout_display_sys_t
HWND
parent
;
RECTL
parent_rect
;
picture_pool_t
*
pool
;
picture_resource_t
resource
;
unsigned
button_pressed
;
bool
is_mouse_hidden
;
bool
is_on_top
;
...
...
@@ -657,24 +656,19 @@ static int OpenDisplay( vout_display_t *vd, video_format_t *fmt )
}
/* Create the associated picture */
picture_resource_t
*
rsc
=
&
sys
->
resource
;
rsc
->
p_sys
=
malloc
(
sizeof
(
*
rsc
->
p_sys
));
if
(
!
rsc
->
p_sys
)
return
VLC_EGENERIC
;
rsc
->
p_sys
->
i_chroma_shift
=
i_chroma_shift
;
picture_sys_t
*
picsys
=
malloc
(
sizeof
(
*
picsys
)
);
if
(
picsys
==
NULL
)
return
VLC_ENOMEM
;
picsys
->
i_chroma_shift
=
i_chroma_shift
;
for
(
int
i
=
0
;
i
<
PICTURE_PLANE_MAX
;
i
++
)
picture_resource_t
resource
=
{
.
p_sys
=
picsys
};
picture_t
*
picture
=
picture_NewFromResource
(
fmt
,
&
resource
);
if
(
!
picture
)
{
rsc
->
p
[
i
].
p_pixels
=
NULL
;
rsc
->
p
[
i
].
i_pitch
=
0
;
rsc
->
p
[
i
].
i_lines
=
0
;
free
(
picsys
);
return
VLC_ENOMEM
;
}
picture_t
*
picture
=
picture_NewFromResource
(
fmt
,
rsc
);
if
(
!
picture
)
goto
exit_picture
;
/* Wrap it into a picture pool */
picture_pool_configuration_t
pool_cfg
;
memset
(
&
pool_cfg
,
0
,
sizeof
(
pool_cfg
));
...
...
@@ -687,8 +681,7 @@ static int OpenDisplay( vout_display_t *vd, video_format_t *fmt )
if
(
!
sys
->
pool
)
{
picture_Release
(
picture
);
goto
exit_picture
;
return
VLC_ENOMEM
;
}
if
(
vd
->
cfg
->
display
.
title
)
...
...
@@ -726,11 +719,6 @@ static int OpenDisplay( vout_display_t *vd, video_format_t *fmt )
SWP_ACTIVATE
);
return
VLC_SUCCESS
;
exit_picture:
free
(
rsc
->
p_sys
);
return
VLC_EGENERIC
;
}
/*****************************************************************************
...
...
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