]> git.sesse.net Git - vlc/blobdiff - modules/video_output/xcb/xvideo.c
Made XCB xvideo independant of VOUT_MAX_PICTURES.
[vlc] / modules / video_output / xcb / xvideo.c
index 9335fba49f3c85e5e5f55ac08eb9af8872b0322b..ecb58ba2e0352d1f42c4795c20219ecce0fa29a7 100644 (file)
@@ -71,7 +71,7 @@ vlc_module_begin ()
     add_shortcut ("xvideo")
 vlc_module_end ()
 
-#define MAX_PICTURES (VOUT_MAX_PICTURES)
+#define MAX_PICTURES (128)
 
 struct vout_display_sys_t
 {
@@ -532,10 +532,13 @@ static int Open (vlc_object_t *obj)
     vd->manage = Manage;
 
     /* */
-    vout_display_SendEventFullscreen (vd, false);
+    bool is_fullscreen = vd->cfg->is_fullscreen;
+    if (is_fullscreen && vout_window_SetFullScreen (p_sys->embed, true))
+        is_fullscreen = false;
+    vout_display_SendEventFullscreen (vd, is_fullscreen);
     unsigned width, height;
     if (!GetWindowSize (p_sys->embed, conn, &width, &height))
-        vout_display_SendEventDisplaySize (vd, width, height, false);
+        vout_display_SendEventDisplaySize (vd, width, height, is_fullscreen);
 
     return VLC_SUCCESS;
 
@@ -583,7 +586,6 @@ static void Close (vlc_object_t *obj)
 static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count)
 {
     vout_display_sys_t *p_sys = vd->sys;
-    (void)requested_count;
 
     if (!p_sys->pool)
     {
@@ -597,8 +599,10 @@ static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count)
 
         unsigned count;
         picture_t *pic_array[MAX_PICTURES];
-        for (count = 0; count < MAX_PICTURES; count++)
+        for (count = 0; count < requested_count; count++)
         {
+            if (count >= MAX_PICTURES)
+                break;
             picture_resource_t *res = &p_sys->resource[count];
 
             for (int i = 0; i < __MIN (p_sys->att->num_planes, PICTURE_PLANE_MAX); i++)