mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
osxvideosink: default to the main in case we are not setup yet
This commit is contained in:
parent
0e321b87d4
commit
34a5b93637
1 changed files with 8 additions and 1 deletions
|
@ -90,9 +90,16 @@ gst_osx_video_sink_call_from_main_thread(GstOSXVideoSink *osxvideosink,
|
|||
NSObject * object, SEL function, NSObject *data, BOOL waitUntilDone)
|
||||
{
|
||||
|
||||
NSThread *thread;
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
[object performSelector:function onThread:sink_class->ns_app_thread
|
||||
if (sink_class->ns_app_thread == NULL){
|
||||
thread = [NSThread mainThread];
|
||||
} else {
|
||||
thread = sink_class->ns_app_thread;
|
||||
}
|
||||
|
||||
[object performSelector:function onThread:thread
|
||||
withObject:data waitUntilDone:waitUntilDone];
|
||||
[pool release];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue