]> git.sesse.net Git - vlc/commitdiff
SDL: check that the vout is not windowed
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 14 Oct 2014 19:43:23 +0000 (22:43 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 16 Oct 2014 17:23:39 +0000 (20:23 +0300)
If there is a window, it has to be used given the video output has non-zero
priority. Unfortunately, there are no good ways to run SDL within a window
(it can be done, but it is not thread-safe).

modules/video_output/sdl.c

index 168949f535d6a5206e5faaec68dbd6c1b4c391e1..c81c59ccaf98e1fe4c0a94f66dce118ba003468b 100644 (file)
@@ -116,6 +116,8 @@ static int Open(vlc_object_t *object)
     vout_display_t *vd = (vout_display_t *)object;
     vout_display_sys_t *sys;
 
+    if (vout_display_IsWindowed(vd))
+        return VLC_EGENERIC;
 #if !defined(_WIN32) && !defined(__OS2__)
     if (!vlc_xlib_init (object))
         return VLC_EGENERIC;
@@ -191,7 +193,6 @@ static int Open(vlc_object_t *object)
         msg_Err(vd, "no video mode available");
         goto error;
     }
-    vout_display_DeleteWindow(vd, NULL);
 
     sys->display = SDL_SetVideoMode(display_width, display_height,
                                     sys->display_bpp, sys->display_flags);