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

XCB/XVideo: fix images with a planar format but without MIT-SHM

parent 14670f9c
...@@ -79,6 +79,7 @@ struct vout_sys_t ...@@ -79,6 +79,7 @@ struct vout_sys_t
uint32_t id; /* XVideo format */ uint32_t id; /* XVideo format */
uint16_t width; /* display width */ uint16_t width; /* display width */
uint16_t height; /* display height */ uint16_t height; /* display height */
uint32_t data_size; /* picture byte size (for non-SHM) */
bool shm; /* whether to use MIT-SHM */ bool shm; /* whether to use MIT-SHM */
}; };
...@@ -443,6 +444,7 @@ static int Init (vout_thread_t *vout) ...@@ -443,6 +444,7 @@ static int Init (vout_thread_t *vout)
const uint32_t *offsets; const uint32_t *offsets;
found_adaptor: found_adaptor:
offsets = xcb_xv_query_image_attributes_offsets (att); offsets = xcb_xv_query_image_attributes_offsets (att);
p_sys->data_size = att->data_size;
I_OUTPUTPICTURES = 0; I_OUTPUTPICTURES = 0;
for (size_t index = 0; I_OUTPUTPICTURES < 2; index++) for (size_t index = 0; I_OUTPUTPICTURES < 2; index++)
...@@ -537,9 +539,8 @@ static void Display (vout_thread_t *vout, picture_t *pic) ...@@ -537,9 +539,8 @@ static void Display (vout_thread_t *vout, picture_t *pic)
pic->p->i_visible_pitch / pic->p->i_pixel_pitch, pic->p->i_visible_pitch / pic->p->i_pixel_pitch,
pic->p->i_visible_lines, pic->p->i_visible_lines,
0, 0, p_sys->width, p_sys->height, 0, 0, p_sys->width, p_sys->height,
pic->p->i_pitch / pic->p->i_pixel_pitch, vout->fmt_out.i_width, vout->fmt_out.i_height,
pic->p->i_lines, p_sys->data_size, pic->p->p_pixels);
pic->p->i_pitch * pic->p->i_lines, pic->p->p_pixels);
xcb_flush (p_sys->conn); xcb_flush (p_sys->conn);
} }
......
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