osxvideosink: default to the main in case we are not setup yet

parent 0e321b87
......@@ -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];
}
......
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