Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
1a4176cd
Commit
1a4176cd
authored
Jun 14, 2007
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix potential memleak/crash
parent
3869712a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/video_output/vout_subpictures.c
src/video_output/vout_subpictures.c
+5
-3
No files found.
src/video_output/vout_subpictures.c
View file @
1a4176cd
...
...
@@ -277,6 +277,8 @@ subpicture_region_t *__spu_CreateRegion( vlc_object_t *p_this,
video_format_t
*
p_fmt
)
{
subpicture_region_t
*
p_region
=
malloc
(
sizeof
(
subpicture_region_t
)
);
if
(
!
p_region
)
return
NULL
;
memset
(
p_region
,
0
,
sizeof
(
subpicture_region_t
)
);
p_region
->
p_next
=
0
;
p_region
->
p_cache
=
0
;
...
...
@@ -299,7 +301,7 @@ subpicture_region_t *__spu_CreateRegion( vlc_object_t *p_this,
if
(
!
p_region
->
picture
.
i_planes
)
{
free
(
p_region
);
free
(
p_fmt
->
p_palette
);
if
(
p_fmt
->
p_palette
)
free
(
p_fmt
->
p_palette
);
return
NULL
;
}
...
...
@@ -675,8 +677,8 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
}
/* Force palette if requested */
if
(
p_spu
->
b_force_palette
&&
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'P'
)
==
p_region
->
fmt
.
i_chroma
)
if
(
p_spu
->
b_force_palette
&&
(
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'P'
)
==
p_region
->
fmt
.
i_chroma
)
)
{
memcpy
(
p_region
->
fmt
.
p_palette
->
palette
,
p_spu
->
palette
,
16
);
...
...
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