Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
e339d116
Commit
e339d116
authored
Jul 03, 2010
by
Srikanth Raju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ML: Use a lock for ml_Create
parent
c78c2b56
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
0 deletions
+5
-0
src/libvlc.c
src/libvlc.c
+2
-0
src/libvlc.h
src/libvlc.h
+1
-0
src/misc/media_library.c
src/misc/media_library.c
+2
-0
No files found.
src/libvlc.c
View file @
e339d116
...
...
@@ -229,6 +229,7 @@ libvlc_int_t * libvlc_InternalCreate( void )
#endif
/* Initialize mutexes */
vlc_mutex_init
(
&
priv
->
ml_lock
);
vlc_mutex_init
(
&
priv
->
timer_lock
);
vlc_ExitInit
(
&
priv
->
exit
);
...
...
@@ -1060,6 +1061,7 @@ void libvlc_InternalDestroy( libvlc_int_t *p_libvlc )
/* Destroy mutexes */
vlc_ExitDestroy
(
&
priv
->
exit
);
vlc_mutex_destroy
(
&
priv
->
timer_lock
);
vlc_mutex_destroy
(
&
priv
->
ml_lock
);
#ifndef NDEBUG
/* Hack to dump leaked objects tree */
if
(
vlc_internals
(
p_libvlc
)
->
i_refcount
>
1
)
...
...
src/libvlc.h
View file @
e339d116
...
...
@@ -215,6 +215,7 @@ typedef struct libvlc_priv_t
module_t
*
p_memcpy_module
;
///< Fast memcpy plugin used
playlist_t
*
p_playlist
;
///< the playlist singleton
media_library_t
*
p_ml
;
///< the ML singleton
vlc_mutex_t
ml_lock
;
///< Mutex for ML creation
vlm_t
*
p_vlm
;
///< the VLM singleton (or NULL)
vlc_object_t
*
p_dialog_provider
;
///< dialog provider
httpd_t
*
p_httpd
;
///< HTTP daemon (src/network/httpd.c)
...
...
src/misc/media_library.c
View file @
e339d116
...
...
@@ -111,6 +111,7 @@ media_library_t *ml_Create( vlc_object_t *p_this, char *psz_name )
media_library_t
*
ml_Hold
(
vlc_object_t
*
p_this
)
{
media_library_t
*
p_ml
;
vlc_mutex_lock
(
&
(
libvlc_priv
(
p_this
->
p_libvlc
)
->
ml_lock
)
);
p_ml
=
libvlc_priv
(
p_this
->
p_libvlc
)
->
p_ml
;
assert
(
VLC_OBJECT
(
p_ml
)
!=
p_this
);
if
(
p_ml
==
NULL
&&
...
...
@@ -122,6 +123,7 @@ media_library_t* ml_Hold( vlc_object_t* p_this )
}
if
(
p_ml
)
vlc_object_hold
(
p_ml
);
vlc_mutex_unlock
(
&
(
libvlc_priv
(
p_this
->
p_libvlc
)
->
ml_lock
)
);
return
p_ml
;
}
...
...
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