mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-27 16:55:05 +00:00
osxvideosink: default to the main in case we are not setup yet
This commit is contained in:
parent
0e321b87d4
commit
34a5b93637
|
@ -90,9 +90,16 @@ gst_osx_video_sink_call_from_main_thread(GstOSXVideoSink *osxvideosink,
|
||||||
NSObject * object, SEL function, NSObject *data, BOOL waitUntilDone)
|
NSObject * object, SEL function, NSObject *data, BOOL waitUntilDone)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
NSThread *thread;
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
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];
|
withObject:data waitUntilDone:waitUntilDone];
|
||||||
[pool release];
|
[pool release];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue