Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
ef5277d8
Commit
ef5277d8
authored
Jun 01, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
control/event.c: Make sure the event won't be listened to.
parent
60bd120e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
4 deletions
+28
-4
src/control/event.c
src/control/event.c
+28
-4
No files found.
src/control/event.c
View file @
ef5277d8
...
...
@@ -89,6 +89,7 @@ void libvlc_event_add_callback( libvlc_instance_t *p_instance,
{
struct
libvlc_callback_entry_t
*
entry
;
const
char
*
callback_name
=
NULL
;
int
res
;
if
(
!
f_callback
)
RAISEVOID
(
" Callback function is null "
);
...
...
@@ -117,10 +118,10 @@ void libvlc_event_add_callback( libvlc_instance_t *p_instance,
RAISEVOID
(
"Unsupported event."
);
}
int
res
=
var_AddCallback
(
p_instance
->
p_libvlc_int
,
callback_name
,
handle_event
,
entry
);
res
=
var_AddCallback
(
p_instance
->
p_libvlc_int
,
callback_name
,
handle_event
,
entry
);
if
(
res
!=
VLC_SUCCESS
)
{
...
...
@@ -166,12 +167,35 @@ void libvlc_event_remove_callback( libvlc_instance_t *p_instance,
)
{
const
char
*
callback_name
=
NULL
;
int
res
;
if
(
p_listitem
->
prev
)
p_listitem
->
prev
->
next
=
p_listitem
->
next
;
else
p_instance
->
p_callback_list
=
p_listitem
->
next
;
p_listitem
->
next
->
prev
=
p_listitem
->
prev
;
switch
(
i_event_type
)
{
case
VOLUME_CHANGED
:
callback_name
=
"volume-change"
;
break
;
case
INPUT_POSITION_CHANGED
:
break
;
default:
RAISEVOID
(
"Unsupported event."
);
}
res
=
var_RemoveCallback
(
p_instance
->
p_libvlc_int
,
callback_name
,
p_listitem
->
elmt
);
if
(
res
!=
VLC_SUCCESS
)
{
RAISEVOID
(
"Internal callback unregistration was not successful. Callback not unregistered."
);
}
free
(
p_listitem
->
elmt
);
/* FIXME: need some locking here */
free
(
p_listitem
);
break
;
...
...
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