]> git.sesse.net Git - vlc/commitdiff
iOS: check that the vout is not windowed
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 14 Oct 2014 19:43:01 +0000 (22:43 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 16 Oct 2014 17:23:39 +0000 (20:23 +0300)
modules/video_output/ios2.m

index b90d693daac3528ea533014c35eaf2d0f57ed497..feb22036206670e66a0f4aff1270280a9b8893dc 100644 (file)
@@ -121,6 +121,10 @@ static void *OurGetProcAddress(vlc_gl_t *gl, const char *name)
 static int Open(vlc_object_t *this)
 {
     vout_display_t *vd = (vout_display_t *)this;
+
+    if (vout_display_IsWindowed(vd))
+        return VLC_EGENERIC;
+
     vout_display_sys_t *sys = calloc (1, sizeof(*sys));
     NSAutoreleasePool *autoreleasePool = nil;
 
@@ -138,8 +142,6 @@ static int Open(vlc_object_t *this)
     if (!viewContainer || ![viewContainer isKindOfClass:[UIView class]])
         goto bailout;
 
-    vout_display_DeleteWindow (vd, NULL);
-
     /* This will be released in Close(), on
      * main thread, after we are done using it. */
     sys->viewContainer = [viewContainer retain];