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
8f5541c5
Commit
8f5541c5
authored
May 25, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplification
parent
07dd8683
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
26 deletions
+11
-26
src/misc/objects.c
src/misc/objects.c
+11
-26
No files found.
src/misc/objects.c
View file @
8f5541c5
...
...
@@ -90,7 +90,6 @@ static void DumpStructure( vlc_object_internals_t *, unsigned, char * );
static
vlc_list_t
*
NewList
(
int
);
static
void
vlc_object_destroy
(
vlc_object_t
*
p_this
);
static
void
vlc_object_detach_unlocked
(
vlc_object_t
*
p_this
);
/*****************************************************************************
* Local structure lock
...
...
@@ -255,9 +254,6 @@ static void vlc_object_destroy( vlc_object_t *p_this )
{
vlc_object_internals_t
*
p_priv
=
vlc_internals
(
p_this
);
/* Objects are always detached beforehand */
assert
(
!
p_this
->
p_parent
);
/* Send a kill to the object's thread if applicable */
vlc_object_kill
(
p_this
);
...
...
@@ -584,10 +580,18 @@ void vlc_object_release( vlc_object_t *p_this )
if
(
b_should_destroy
)
{
/* Detach from parent to protect against FIND_CHILDREN */
parent
=
p_this
->
p_parent
;
if
(
parent
)
/* Detach from parent to protect against FIND_CHILDREN */
vlc_object_detach_unlocked
(
p_this
);
if
(
likely
(
parent
))
{
/* Unlink */
if
(
internals
->
prev
!=
NULL
)
internals
->
prev
->
next
=
internals
->
next
;
else
vlc_internals
(
parent
)
->
first
=
internals
->
next
;
if
(
internals
->
next
!=
NULL
)
internals
->
next
->
prev
=
internals
->
prev
;
}
/* We have no children */
assert
(
internals
->
first
==
NULL
);
...
...
@@ -638,25 +642,6 @@ void vlc_object_attach( vlc_object_t *p_this, vlc_object_t *p_parent )
}
static
void
vlc_object_detach_unlocked
(
vlc_object_t
*
p_this
)
{
assert
(
p_this
->
p_parent
!=
NULL
);
vlc_object_internals_t
*
pap
=
vlc_internals
(
p_this
->
p_parent
);
vlc_object_internals_t
*
priv
=
vlc_internals
(
p_this
);
/* Unlink */
if
(
priv
->
prev
!=
NULL
)
priv
->
prev
->
next
=
priv
->
next
;
else
pap
->
first
=
priv
->
next
;
if
(
priv
->
next
!=
NULL
)
priv
->
next
->
prev
=
priv
->
prev
;
/* Remove p_this's parent */
p_this
->
p_parent
=
NULL
;
}
#undef vlc_list_children
/**
* Gets the list of children of an objects, and increment their reference
...
...
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