examples: initialize NSApp at the beginning
authorJulien Isorce <j.isorce@samsung.com>
Fri, 13 Mar 2015 09:07:16 +0000 (09:07 +0000)
committerJulien Isorce <j.isorce@samsung.com>
Sat, 14 Mar 2015 08:37:52 +0000 (08:37 +0000)
tests/examples/gl/cocoa/cocoa-videooverlay.m

index 78c1969..a783c56 100755 (executable)
@@ -166,6 +166,9 @@ int main(int argc, char **argv)
   NSRect rect;
   MainWindow *window=nil;
 
+  pool = [[NSAutoreleasePool alloc] init];
+  [NSApplication sharedApplication];
+
   g_print("app created\n");
 
   gst_init (&argc, &argv);
@@ -192,9 +195,6 @@ int main(int argc, char **argv)
   if (!ok)
     g_warning("could not link videosrc to videosink\n");
 
-  pool = [[NSAutoreleasePool alloc] init];
-  [NSApplication sharedApplication];
-
   rect.origin.x = 0; rect.origin.y = 0;
   rect.size.width = width; rect.size.height = height;