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
e1f1b1e2
Commit
e1f1b1e2
authored
Aug 19, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlccore: the object counter is specific so misc/objects.c
parent
9674dc7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
src/libvlc.h
src/libvlc.h
+0
-3
src/misc/objects.c
src/misc/objects.c
+4
-3
No files found.
src/libvlc.h
View file @
e1f1b1e2
...
...
@@ -154,9 +154,6 @@ typedef struct libvlc_global_data_t
{
VLC_COMMON_MEMBERS
/* Object structure data */
int
i_counter
;
///< object counter
module_bank_t
*
p_module_bank
;
///< The module bank
char
*
psz_vlcpath
;
...
...
src/misc/objects.c
View file @
e1f1b1e2
...
...
@@ -94,7 +94,8 @@ static void held_objects_destroy (void *);
/*****************************************************************************
* Local structure lock
*****************************************************************************/
static
vlc_mutex_t
structure_lock
;
static
vlc_mutex_t
structure_lock
;
static
unsigned
object_counter
=
0
;
void
*
__vlc_custom_create
(
vlc_object_t
*
p_this
,
size_t
i_size
,
int
i_type
,
const
char
*
psz_type
)
...
...
@@ -148,7 +149,7 @@ void *__vlc_custom_create( vlc_object_t *p_this, size_t i_size,
p_libvlc_global
=
(
libvlc_global_data_t
*
)
p_new
;
p_new
->
p_libvlc
=
NULL
;
p_libvlc_global
->
i_counter
=
0
;
object_counter
=
0
;
/* reset */
p_priv
->
next
=
p_priv
->
prev
=
p_new
;
vlc_mutex_init
(
&
structure_lock
);
#ifdef LIBVLC_REFCHECK
...
...
@@ -194,7 +195,7 @@ void *__vlc_custom_create( vlc_object_t *p_this, size_t i_size,
p_priv
->
prev
=
vlc_internals
(
p_libvlc_global
)
->
prev
;
vlc_internals
(
p_libvlc_global
)
->
prev
=
p_new
;
vlc_internals
(
p_priv
->
prev
)
->
next
=
p_new
;
p_new
->
i_object_id
=
p_libvlc_global
->
i_counter
++
;
p_new
->
i_object_id
=
object_counter
++
;
/* fetch THEN increment */
vlc_mutex_unlock
(
&
structure_lock
);
if
(
i_type
==
VLC_OBJECT_LIBVLC
)
...
...
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