summaryrefslogtreecommitdiff
path: root/sys/osxvideo/osxvideosink.h
diff options
context:
space:
mode:
authorAlessandro Decina <alessandro.decina@collabora.co.uk>2012-05-26 12:21:18 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-05-31 10:26:10 +0200
commitf20cdcd36b398d92dba5240dddb948cc49465180 (patch)
tree6dcbe09837675c94583d98abf18e7acdd359424e /sys/osxvideo/osxvideosink.h
parent76b7998e4f424b8258049b6483b205784477d280 (diff)
downloadgstreamer-plugins-good-f20cdcd36b398d92dba5240dddb948cc49465180.tar.gz
osxvideosink: fix race in starting the runloop thread
Block gst_osx_video_sink_run_cocoa_loop until the loop thread has started and finished initializing NSApp. Fixes occasional warnings/crashes due to two threads going inside NSApp before finishLaunching had completed.
Diffstat (limited to 'sys/osxvideo/osxvideosink.h')
-rw-r--r--sys/osxvideo/osxvideosink.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/osxvideo/osxvideosink.h b/sys/osxvideo/osxvideosink.h
index 2d18f137c..5d32f5ceb 100644
--- a/sys/osxvideo/osxvideosink.h
+++ b/sys/osxvideo/osxvideosink.h
@@ -77,10 +77,12 @@ struct _GstOSXVideoSink {
NSView *superview;
#ifdef RUN_NS_APP_THREAD
NSThread *ns_app_thread;
+ GMutex *loop_thread_lock;
+ GCond *loop_thread_cond;
#else
guint cocoa_timeout;
- gboolean app_started;
#endif
+ gboolean app_started;
gboolean keep_par;
gboolean embed;
};