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
31bdf929
Commit
31bdf929
authored
Mar 05, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Privatize the LibVLC exit lock
parent
53ef2ffc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
src/libvlc.c
src/libvlc.c
+8
-5
No files found.
src/libvlc.c
View file @
31bdf929
...
...
@@ -1185,6 +1185,8 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc, char const *psz_module )
return
VLC_SUCCESS
;
};
static
vlc_mutex_t
exit_lock
=
VLC_STATIC_MUTEX
;
/**
* Waits until the LibVLC instance gets an exit signal. Normally, this happens
* when the user "exits" an interface plugin.
...
...
@@ -1192,12 +1194,11 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc, char const *psz_module )
void
libvlc_InternalWait
(
libvlc_int_t
*
p_libvlc
)
{
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_libvlc
);
vlc_object_internals_t
*
internals
=
vlc_internals
(
p_libvlc
);
vlc_
object_lock
(
p_libvlc
);
vlc_
mutex_lock
(
&
exit_lock
);
while
(
vlc_object_alive
(
p_libvlc
)
)
vlc_cond_wait
(
&
priv
->
exiting
,
&
internals
->
lock
);
vlc_
object_unlock
(
p_libvlc
);
vlc_cond_wait
(
&
priv
->
exiting
,
&
exit_
lock
);
vlc_
mutex_unlock
(
&
exit_lock
);
}
/**
...
...
@@ -1208,8 +1209,10 @@ void libvlc_Quit( libvlc_int_t *p_libvlc )
{
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_libvlc
);
vlc_mutex_lock
(
&
exit_lock
);
vlc_object_kill
(
p_libvlc
);
vlc_cond_signal
(
&
priv
->
exiting
);
/* OK, kill took care of the lock */
vlc_cond_signal
(
&
priv
->
exiting
);
vlc_mutex_unlock
(
&
exit_lock
);
}
#if defined( ENABLE_NLS ) && (defined (__APPLE__) || defined (WIN32)) && \
...
...
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