Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
aa9715b2
Commit
aa9715b2
authored
Dec 29, 2007
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify *install_input_item_observer()
parent
de8a547c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/playlist/item.c
src/playlist/item.c
+8
-8
No files found.
src/playlist/item.c
View file @
aa9715b2
...
...
@@ -104,18 +104,18 @@ static void input_item_subitem_added( const vlc_event_t * p_event,
/*****************************************************************************
* Listen to vlc_InputItemAddSubItem event
*****************************************************************************/
static
void
install_input_item_observer
(
playlist_item_t
*
p_item
,
input_item_t
*
p_input
)
static
void
install_input_item_observer
(
playlist_item_t
*
p_item
)
{
vlc_event_attach
(
&
p_input
->
event_manager
,
vlc_InputItemSubItemAdded
,
vlc_event_attach
(
&
p_item
->
p_input
->
event_manager
,
vlc_InputItemSubItemAdded
,
input_item_subitem_added
,
p_item
);
}
static
void
uninstall_input_item_observer
(
playlist_item_t
*
p_item
,
input_item_t
*
p_input
)
static
void
uninstall_input_item_observer
(
playlist_item_t
*
p_item
)
{
vlc_event_detach
(
&
p_input
->
event_manager
,
vlc_InputItemSubItemAdded
,
vlc_event_detach
(
&
p_item
->
p_input
->
event_manager
,
vlc_InputItemSubItemAdded
,
input_item_subitem_added
,
p_item
);
...
...
@@ -156,7 +156,7 @@ playlist_item_t *__playlist_ItemNewFromInput( vlc_object_t *p_obj,
p_item
->
i_flags
=
0
;
p_item
->
p_playlist
=
p_playlist
;
install_input_item_observer
(
p_item
,
p_input
);
install_input_item_observer
(
p_item
);
pl_Release
(
p_item
->
p_playlist
);
...
...
@@ -170,7 +170,7 @@ playlist_item_t *__playlist_ItemNewFromInput( vlc_object_t *p_obj,
/** Delete a playlist item and detach its input item */
int
playlist_ItemDelete
(
playlist_item_t
*
p_item
)
{
uninstall_input_item_observer
(
p_item
,
p_item
->
p_input
);
uninstall_input_item_observer
(
p_item
);
vlc_gc_decref
(
p_item
->
p_input
);
free
(
p_item
);
...
...
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