diff options
author | Alessandro Decina <alessandro.decina@collabora.co.uk> | 2012-05-26 12:21:18 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-05-31 10:26:10 +0200 |
commit | f20cdcd36b398d92dba5240dddb948cc49465180 (patch) | |
tree | 6dcbe09837675c94583d98abf18e7acdd359424e /sys/osxvideo/osxvideosink.h | |
parent | 76b7998e4f424b8258049b6483b205784477d280 (diff) | |
download | gstreamer-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.h | 4 |
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; }; |