Commit 9702039e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

minimal_macosx: simplify killer thread loop

vlc_object_alive(p_intf) is always true.
parent a98b6aba
......@@ -40,8 +40,5 @@
struct intf_sys_t
{
int nothing_for_now;
vlc_mutex_t lock;
vlc_cond_t wait;
};
......@@ -31,6 +31,7 @@
#ifdef HAVE_CONFIG_H
# import "config.h"
#endif
#include <unistd.h>
#import <vlc_playlist.h>
#import <vlc_vout_window.h>
......@@ -91,16 +92,8 @@ static void * KillerThread(void *user_data)
intf_thread_t *p_intf = user_data;
vlc_mutex_init(&p_intf->p_sys->lock);
vlc_cond_init(&p_intf->p_sys->wait);
vlc_mutex_lock (&p_intf->p_sys->lock);
while(vlc_object_alive(p_intf))
vlc_cond_wait(&p_intf->p_sys->wait, &p_intf->p_sys->lock);
vlc_mutex_unlock(&p_intf->p_sys->lock);
vlc_mutex_destroy(&p_intf->p_sys->lock);
vlc_cond_destroy(&p_intf->p_sys->wait);
for(;;)
pause();
/* We are dead, terminate */
[NSApp terminate: nil];
......
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