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
4863b62d
Commit
4863b62d
authored
Mar 04, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a private lock for input item ID allocation
parent
3cbb926a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/input/item.c
src/input/item.c
+3
-2
No files found.
src/input/item.c
View file @
4863b62d
...
@@ -645,6 +645,7 @@ input_item_t *input_item_NewWithType( vlc_object_t *p_obj, const char *psz_uri,
...
@@ -645,6 +645,7 @@ input_item_t *input_item_NewWithType( vlc_object_t *p_obj, const char *psz_uri,
int
i_type
)
int
i_type
)
{
{
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_obj
->
p_libvlc
);
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_obj
->
p_libvlc
);
static
vlc_mutex_t
input_id_lock
=
VLC_STATIC_MUTEX
;
input_item_t
*
p_input
=
malloc
(
sizeof
(
input_item_t
)
);
input_item_t
*
p_input
=
malloc
(
sizeof
(
input_item_t
)
);
if
(
!
p_input
)
if
(
!
p_input
)
...
@@ -653,9 +654,9 @@ input_item_t *input_item_NewWithType( vlc_object_t *p_obj, const char *psz_uri,
...
@@ -653,9 +654,9 @@ input_item_t *input_item_NewWithType( vlc_object_t *p_obj, const char *psz_uri,
input_item_Init
(
p_obj
,
p_input
);
input_item_Init
(
p_obj
,
p_input
);
vlc_gc_init
(
p_input
,
input_item_Destroy
);
vlc_gc_init
(
p_input
,
input_item_Destroy
);
vlc_
object_lock
(
p_obj
->
p_libvlc
);
vlc_
mutex_lock
(
&
input_id_lock
);
p_input
->
i_id
=
++
priv
->
i_last_input_id
;
p_input
->
i_id
=
++
priv
->
i_last_input_id
;
vlc_
object_unlock
(
p_obj
->
p_libvlc
);
vlc_
mutex_unlock
(
&
input_id_lock
);
p_input
->
b_fixed_name
=
false
;
p_input
->
b_fixed_name
=
false
;
...
...
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