[vlc-commits] SDL: check that the vout is not windowed

Rémi Denis-Courmont git at videolan.org
Thu Oct 16 19:26:12 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Oct 14 22:43:23 2014 +0300| [9b24bfb5b3b9f07c3cc0e54480ba0bc12a92748f] | committer: Rémi Denis-Courmont

SDL: check that the vout is not windowed

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).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9b24bfb5b3b9f07c3cc0e54480ba0bc12a92748f
---

 modules/video_output/sdl.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/sdl.c b/modules/video_output/sdl.c
index 168949f..c81c59c 100644
--- a/modules/video_output/sdl.c
+++ b/modules/video_output/sdl.c
@@ -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);



More information about the vlc-commits mailing list