[vlc-devel] commit: XCB/XVideo: fix images with a planar format but without MIT-SHM ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu May 7 22:59:22 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May  7 23:32:24 2009 +0300| [bad101babdeb5822e6e5b30edbb1c78fc2ce45c2] | committer: Rémi Denis-Courmont 

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

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

 modules/video_output/xcb/xvideo.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index c1c5895..b5827be 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -79,6 +79,7 @@ struct vout_sys_t
     uint32_t id;         /* XVideo format */
     uint16_t width;      /* display width */
     uint16_t height;     /* display height */
+    uint32_t data_size;  /* picture byte size (for non-SHM) */
     bool shm;            /* whether to use MIT-SHM */
 };
 
@@ -443,6 +444,7 @@ static int Init (vout_thread_t *vout)
     const uint32_t *offsets;
 found_adaptor:
     offsets = xcb_xv_query_image_attributes_offsets (att);
+    p_sys->data_size = att->data_size;
 
     I_OUTPUTPICTURES = 0;
     for (size_t index = 0; I_OUTPUTPICTURES < 2; index++)
@@ -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_lines,
                           0, 0, p_sys->width, p_sys->height,
-                          pic->p->i_pitch / pic->p->i_pixel_pitch,
-                          pic->p->i_lines,
-                          pic->p->i_pitch * pic->p->i_lines, pic->p->p_pixels);
+                          vout->fmt_out.i_width, vout->fmt_out.i_height,
+                          p_sys->data_size, pic->p->p_pixels);
     xcb_flush (p_sys->conn);
 }
 




More information about the vlc-devel mailing list