Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
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,
...
@@ -277,6 +277,8 @@ subpicture_region_t *__spu_CreateRegion( vlc_object_t *p_this,
video_format_t
*
p_fmt
)
video_format_t
*
p_fmt
)
{
{
subpicture_region_t
*
p_region
=
malloc
(
sizeof
(
subpicture_region_t
)
);
subpicture_region_t
*
p_region
=
malloc
(
sizeof
(
subpicture_region_t
)
);
if
(
!
p_region
)
return
NULL
;
memset
(
p_region
,
0
,
sizeof
(
subpicture_region_t
)
);
memset
(
p_region
,
0
,
sizeof
(
subpicture_region_t
)
);
p_region
->
p_next
=
0
;
p_region
->
p_next
=
0
;
p_region
->
p_cache
=
0
;
p_region
->
p_cache
=
0
;
...
@@ -299,7 +301,7 @@ subpicture_region_t *__spu_CreateRegion( vlc_object_t *p_this,
...
@@ -299,7 +301,7 @@ subpicture_region_t *__spu_CreateRegion( vlc_object_t *p_this,
if
(
!
p_region
->
picture
.
i_planes
)
if
(
!
p_region
->
picture
.
i_planes
)
{
{
free
(
p_region
);
free
(
p_region
);
free
(
p_fmt
->
p_palette
);
if
(
p_fmt
->
p_palette
)
free
(
p_fmt
->
p_palette
);
return
NULL
;
return
NULL
;
}
}
...
@@ -675,8 +677,8 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
...
@@ -675,8 +677,8 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
}
}
/* Force palette if requested */
/* Force palette if requested */
if
(
p_spu
->
b_force_palette
&&
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'P'
)
==
if
(
p_spu
->
b_force_palette
&&
p_region
->
fmt
.
i_chroma
)
(
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'P'
)
==
p_region
->
fmt
.
i_chroma
)
)
{
{
memcpy
(
p_region
->
fmt
.
p_palette
->
palette
,
memcpy
(
p_region
->
fmt
.
p_palette
->
palette
,
p_spu
->
palette
,
16
);
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