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
78f85ea0
Commit
78f85ea0
authored
Jun 01, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
control/event.c: Definition at the top of the function and outline the alloc/free strategy.
parent
88e3b3e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
src/control/event.c
src/control/event.c
+17
-5
No files found.
src/control/event.c
View file @
78f85ea0
...
...
@@ -59,6 +59,12 @@ static inline void add_callback_entry( struct libvlc_callback_entry_t *entry,
struct
libvlc_callback_entry_list_t
**
list
)
{
struct
libvlc_callback_entry_list_t
*
new_listitem
;
/* malloc/free strategy:
* - alloc-ded in add_callback_entry
* - free-ed by libvlc_event_remove_callback
* - free-ed in libvlc_destroy when entry is destroyed
*/
new_listitem
=
malloc
(
sizeof
(
struct
libvlc_callback_entry_list_t
)
);
new_listitem
->
elmt
=
entry
;
new_listitem
->
next
=
*
list
;
...
...
@@ -80,17 +86,23 @@ void libvlc_event_add_callback( libvlc_instance_t *p_instance,
void
*
user_data
,
libvlc_exception_t
*
p_e
)
{
struct
libvlc_callback_entry_t
*
entry
;
const
char
*
callback_name
=
NULL
;
if
(
!
&
f_callback
)
if
(
!
f_callback
)
RAISEVOID
(
" Callback function is null "
);
struct
libvlc_callback_entry_t
*
entry
=
malloc
(
sizeof
(
struct
libvlc_callback_entry_t
)
);
/* malloc/free strategy:
* - alloc-ded in libvlc_event_add_callback
* - free-ed by libvlc_event_add_callback on error
* - Not free-ed by libvlc_event_remove_callback (FIXME leaks)
* - Not free-ed in libvlc_destroy when entry is destroyed (FIXME leaks)
*/
entry
=
malloc
(
sizeof
(
struct
libvlc_callback_entry_t
)
);
entry
->
f_callback
=
f_callback
;
entry
->
i_event_type
=
i_event_type
;
entry
->
p_user_data
=
user_data
;
const
char
*
callback_name
;
switch
(
i_event_type
)
{
case
VOLUME_CHANGED
:
...
...
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