[vlc-devel] commit: media_player: Make sure everything gets initialized before the event_loop (!). (Pierre d 'Herbemont )
git version control
git at videolan.org
Tue Jun 9 07:35:52 CEST 2009
vlc | branch: 1.0-bugfix | Pierre d'Herbemont <pdherbemont at free.fr> | Mon Jun 8 20:58:46 2009 -0700| [38e7aa15d7780eae9ab518e4362a3b9957dd3f84] | committer: Pierre d'Herbemont
media_player: Make sure everything gets initialized before the event_loop (!).
Should fix the last event media list player test issue.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=38e7aa15d7780eae9ab518e4362a3b9957dd3f84
---
src/control/event_async.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/control/event_async.c b/src/control/event_async.c
index c16c9d3..5ca8d66 100644
--- a/src/control/event_async.c
+++ b/src/control/event_async.c
@@ -196,7 +196,14 @@ libvlc_event_async_init(libvlc_event_manager_t * p_em)
{
p_em->async_event_queue = calloc(1, sizeof(struct libvlc_event_async_queue));
- int error = vlc_clone (&queue(p_em)->thread, event_async_loop, p_em, VLC_THREAD_PRIORITY_LOW);
+ int error = vlc_threadvar_create(&queue(p_em)->is_asynch_dispatch_thread_var, NULL);
+ assert(!error);
+
+ vlc_mutex_init(&queue(p_em)->lock);
+ vlc_cond_init(&queue(p_em)->signal);
+ vlc_cond_init(&queue(p_em)->signal_idle);
+
+ error = vlc_clone (&queue(p_em)->thread, event_async_loop, p_em, VLC_THREAD_PRIORITY_LOW);
if(error)
{
free(p_em->async_event_queue);
@@ -204,11 +211,6 @@ libvlc_event_async_init(libvlc_event_manager_t * p_em)
return;
}
- vlc_mutex_init(&queue(p_em)->lock);
- vlc_cond_init(&queue(p_em)->signal);
- vlc_cond_init(&queue(p_em)->signal_idle);
- error = vlc_threadvar_create(&queue(p_em)->is_asynch_dispatch_thread_var, NULL);
- assert(!error);
}
/**************************************************************************
More information about the vlc-devel
mailing list