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
c700d394
Commit
c700d394
authored
Aug 30, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlc_custom_create: no need to invoke the global root object
parent
9f6ce1a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
src/misc/objects.c
src/misc/objects.c
+4
-7
No files found.
src/misc/objects.c
View file @
c700d394
...
@@ -142,20 +142,17 @@ void *__vlc_custom_create( vlc_object_t *p_this, size_t i_size,
...
@@ -142,20 +142,17 @@ void *__vlc_custom_create( vlc_object_t *p_this, size_t i_size,
return
NULL
;
return
NULL
;
}
}
libvlc_global_data_t
*
p_libvlc_global
;
if
(
p_this
==
NULL
)
if
(
p_this
==
NULL
)
{
{
/* Only the global root object is created out of the blue */
/* Only the global root object is created out of the blue */
p_libvlc_global
=
(
libvlc_global_data_t
*
)
p_new
;
p_new
->
p_libvlc
=
NULL
;
p_new
->
p_libvlc
=
NULL
;
object_counter
=
0
;
/* reset */
object_counter
=
0
;
/* reset */
p_priv
->
next
=
p_priv
->
prev
=
p_new
;
p_
this
=
p_
priv
->
next
=
p_priv
->
prev
=
p_new
;
vlc_mutex_init
(
&
structure_lock
);
vlc_mutex_init
(
&
structure_lock
);
}
}
else
else
{
{
p_libvlc_global
=
vlc_global
();
if
(
i_type
==
VLC_OBJECT_LIBVLC
)
if
(
i_type
==
VLC_OBJECT_LIBVLC
)
p_new
->
p_libvlc
=
(
libvlc_int_t
*
)
p_new
;
p_new
->
p_libvlc
=
(
libvlc_int_t
*
)
p_new
;
else
else
...
@@ -179,10 +176,10 @@ void *__vlc_custom_create( vlc_object_t *p_this, size_t i_size,
...
@@ -179,10 +176,10 @@ void *__vlc_custom_create( vlc_object_t *p_this, size_t i_size,
vlc_spin_init
(
&
p_priv
->
spin
);
vlc_spin_init
(
&
p_priv
->
spin
);
p_priv
->
pipes
[
0
]
=
p_priv
->
pipes
[
1
]
=
-
1
;
p_priv
->
pipes
[
0
]
=
p_priv
->
pipes
[
1
]
=
-
1
;
p_priv
->
next
=
VLC_OBJECT
(
p_libvlc_global
)
;
p_priv
->
next
=
p_this
;
vlc_mutex_lock
(
&
structure_lock
);
vlc_mutex_lock
(
&
structure_lock
);
p_priv
->
prev
=
vlc_internals
(
p_
libvlc_global
)
->
prev
;
p_priv
->
prev
=
vlc_internals
(
p_
this
)
->
prev
;
vlc_internals
(
p_
libvlc_global
)
->
prev
=
p_new
;
vlc_internals
(
p_
this
)
->
prev
=
p_new
;
vlc_internals
(
p_priv
->
prev
)
->
next
=
p_new
;
vlc_internals
(
p_priv
->
prev
)
->
next
=
p_new
;
p_new
->
i_object_id
=
object_counter
++
;
/* fetch THEN increment */
p_new
->
i_object_id
=
object_counter
++
;
/* fetch THEN increment */
vlc_mutex_unlock
(
&
structure_lock
);
vlc_mutex_unlock
(
&
structure_lock
);
...
...
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