osxvideosink: start the loop before calling [gstview haveSuperview]
authorAlessandro Decina <alessandro.decina@collabora.co.uk>
Thu, 24 May 2012 11:08:35 +0000 (13:08 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 24 May 2012 12:36:13 +0000 (14:36 +0200)
...as haveSuperview requires the mainloop to be running

sys/osxvideo/osxvideosink.m

index e64d40d..8fcb00f 100644 (file)
@@ -227,6 +227,7 @@ gst_osx_video_sink_osxwindow_create (GstOSXVideoSink * osxvideosink, gint width,
 
   GST_INFO_OBJECT (osxvideosink, "'have-ns-view' message sent");
 
+  gst_osx_video_sink_run_cocoa_loop (osxvideosink);
   /* check if have-ns-view was handled and osxwindow->gstview was added to a
    * superview
    */
@@ -254,7 +255,6 @@ gst_osx_video_sink_osxwindow_create (GstOSXVideoSink * osxvideosink, gint width,
          */
         GST_INFO_OBJECT (osxvideosink, "no superview");
       } else {
-        gst_osx_video_sink_run_cocoa_loop (osxvideosink);
         gst_osx_video_sink_call_from_main_thread(osxvideosink->osxvideosinkobject,
           @selector(createInternalWindow), nil, YES);
         GST_INFO_OBJECT (osxvideosink, "No superview, creating an internal window.");