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
efa6a6fe
Commit
efa6a6fe
authored
Aug 16, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gestures: fix callback leak and missing locking
parent
cc69b318
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
modules/control/gestures.c
modules/control/gestures.c
+10
-14
No files found.
modules/control/gestures.c
View file @
efa6a6fe
...
...
@@ -163,11 +163,8 @@ static void Close ( vlc_object_t *p_this )
/* Destroy the callbacks (the order matters!) */
var_DelCallback
(
pl_Get
(
p_intf
),
"input-current"
,
PlaylistEvent
,
p_intf
);
if
(
p_sys
->
p_input
)
{
if
(
p_sys
->
p_input
!=
NULL
)
var_DelCallback
(
p_sys
->
p_input
,
"intf-event"
,
InputEvent
,
p_intf
);
vlc_object_release
(
p_sys
->
p_input
);
}
if
(
p_sys
->
p_vout
)
{
...
...
@@ -469,11 +466,6 @@ static int InputEvent( vlc_object_t *p_this, char const *psz_var,
switch
(
val
.
i_int
)
{
case
INPUT_EVENT_DEAD
:
vlc_object_release
(
p_input
);
p_sys
->
p_input
=
NULL
;
/* FIXME: locking!! */
break
;
case
INPUT_EVENT_VOUT
:
/* intf-event is serialized against itself and is the sole user of
* p_sys->p_vout. So there is no need to acquire the lock currently. */
...
...
@@ -506,14 +498,18 @@ static int PlaylistEvent( vlc_object_t *p_this, char const *psz_var,
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
input_thread_t
*
p_input
=
val
.
p_address
;
(
void
)
p_this
;
(
void
)
psz_var
;
(
void
)
oldval
;
(
void
)
p_this
;
(
void
)
psz_var
;
if
(
p_sys
->
p_input
!=
NULL
)
{
assert
(
p_sys
->
p_input
==
oldval
.
p_address
);
var_DelCallback
(
p_sys
->
p_input
,
"intf-event"
,
InputEvent
,
p_intf
);
}
assert
(
p_sys
->
p_input
==
NULL
)
;
p_sys
->
p_input
=
p_input
;
if
(
p_input
!=
NULL
)
{
var_AddCallback
(
p_input
,
"intf-event"
,
InputEvent
,
p_intf
);
p_sys
->
p_input
=
vlc_object_hold
(
p_input
);
}
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