Commit 38c3b44d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Mimic X11 plugin picture allocation

(It still crashes on resize nevertheless)
parent b87b8515
...@@ -484,15 +484,19 @@ static int Init (vout_thread_t *vout) ...@@ -484,15 +484,19 @@ static int Init (vout_thread_t *vout)
xcb_flush (p_sys->conn); xcb_flush (p_sys->conn);
/* Allocate picture buffers */ /* Allocate picture buffers */
do I_OUTPUTPICTURES = 0;
for (size_t index = 0; I_OUTPUTPICTURES < 2; index++)
{ {
picture_t *pic = vout->p_picture + I_OUTPUTPICTURES; picture_t *pic = vout->p_picture + index;
if (index > sizeof (vout->p_picture) / sizeof (pic))
break;
if (pic->i_status != FREE_PICTURE)
continue;
if (PictureInit (vout, pic)) if (PictureInit (vout, pic))
break; break;
PP_OUTPUTPICTURE[I_OUTPUTPICTURES++] = pic; PP_OUTPUTPICTURE[I_OUTPUTPICTURES++] = pic;
} }
while (I_OUTPUTPICTURES < 2);
return VLC_SUCCESS; return VLC_SUCCESS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment