Commit 7b0d5534 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

media_player: Make sure everything gets initialized before the event_loop (!).

Should fix the last event media list player test issue.
parent 39877ea2
...@@ -196,7 +196,14 @@ libvlc_event_async_init(libvlc_event_manager_t * p_em) ...@@ -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)); 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) if(error)
{ {
free(p_em->async_event_queue); free(p_em->async_event_queue);
...@@ -204,11 +211,6 @@ libvlc_event_async_init(libvlc_event_manager_t * p_em) ...@@ -204,11 +211,6 @@ libvlc_event_async_init(libvlc_event_manager_t * p_em)
return; 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);
} }
/************************************************************************** /**************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment