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
1172bcd3
Commit
1172bcd3
authored
Aug 01, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix xosd memleaks.
parent
31a16394
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
modules/misc/notify/xosd.c
modules/misc/notify/xosd.c
+15
-7
No files found.
modules/misc/notify/xosd.c
View file @
1172bcd3
...
@@ -108,6 +108,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -108,6 +108,7 @@ static int Open( vlc_object_t *p_this )
{
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
xosd
*
p_osd
;
xosd
*
p_osd
;
char
*
psz_font
,
psz_colour
;
/* Allocate instance and initialize some members */
/* Allocate instance and initialize some members */
p_intf
->
p_sys
=
(
intf_sys_t
*
)
malloc
(
sizeof
(
intf_sys_t
)
);
p_intf
->
p_sys
=
(
intf_sys_t
*
)
malloc
(
sizeof
(
intf_sys_t
)
);
...
@@ -125,10 +126,13 @@ static int Open( vlc_object_t *p_this )
...
@@ -125,10 +126,13 @@ static int Open( vlc_object_t *p_this )
/* Initialize library */
/* Initialize library */
#if defined(HAVE_XOSD_VERSION_0) || defined(HAVE_XOSD_VERSION_1)
#if defined(HAVE_XOSD_VERSION_0) || defined(HAVE_XOSD_VERSION_1)
p
_osd
=
p_intf
->
p_sys
->
p_osd
=
p
sz_font
=
config_GetPsz
(
p_intf
,
"xosd-font"
);
xosd_init
(
config_GetPsz
(
p_intf
,
"xosd-font"
),
psz_colour
=
config_GetPsz
(
p_intf
,
"xosd-colour"
);
config_GetPsz
(
p_intf
,
"xosd-colour"
)
,
3
,
p_osd
=
p_intf
->
p_sys
->
p_osd
=
xosd_init
(
psz_font
,
psz_colour
,
3
,
XOSD_top
,
0
,
1
);
XOSD_top
,
0
,
1
);
free
(
psz_font
);
free
(
psz_colour
);
if
(
p_intf
->
p_sys
->
p_osd
==
NULL
)
if
(
p_intf
->
p_sys
->
p_osd
==
NULL
)
{
{
msg_Err
(
p_intf
,
"couldn't initialize libxosd"
);
msg_Err
(
p_intf
,
"couldn't initialize libxosd"
);
...
@@ -141,8 +145,11 @@ static int Open( vlc_object_t *p_this )
...
@@ -141,8 +145,11 @@ static int Open( vlc_object_t *p_this )
msg_Err
(
p_intf
,
"couldn't initialize libxosd"
);
msg_Err
(
p_intf
,
"couldn't initialize libxosd"
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
xosd_set_colour
(
p_osd
,
config_GetPsz
(
p_intf
,
"xosd-colour"
)
);
psz_colour
=
config_GetPsz
(
p_intf
,
"xosd-colour"
);
xosd_set_colour
(
p_osd
,
psz_colour
);
xosd_set_timeout
(
p_osd
,
3
);
xosd_set_timeout
(
p_osd
,
3
);
free
(
psz_colour
);
#endif
#endif
...
@@ -152,8 +159,9 @@ static int Open( vlc_object_t *p_this )
...
@@ -152,8 +159,9 @@ static int Open( vlc_object_t *p_this )
pl_Release
(
p_intf
);
pl_Release
(
p_intf
);
/* Set user preferences */
/* Set user preferences */
xosd_set_font
(
p_intf
->
p_sys
->
p_osd
,
psz_font
=
config_GetPsz
(
p_intf
,
"xosd-font"
);
config_GetPsz
(
p_intf
,
"xosd-font"
)
);
xosd_set_font
(
p_intf
->
p_sys
->
p_osd
,
psz_font
);
free
(
psz_font
);
xosd_set_outline_colour
(
p_intf
->
p_sys
->
p_osd
,
"black"
);
xosd_set_outline_colour
(
p_intf
->
p_sys
->
p_osd
,
"black"
);
#ifdef HAVE_XOSD_VERSION_2
#ifdef HAVE_XOSD_VERSION_2
xosd_set_horizontal_offset
(
p_intf
->
p_sys
->
p_osd
,
xosd_set_horizontal_offset
(
p_intf
->
p_sys
->
p_osd
,
...
...
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