vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Mon Oct 31 
22:21:23 2011 +0200| [aa1d564909d15463bab3f737269633fb39820fab] | committer: 
Rémi Denis-Courmont

XCB/XVideo: allow mixed endian format if 8 or 4 bits per component

Mixed endianess is only an issue if the component values are not
aligned inside octets. This fixes Debian #604687.

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

 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 9d45bcf..fd7f5bd 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -134,9 +134,6 @@ static bool CheckXVideo (vout_display_t *vd, 
xcb_connection_t *conn)
 static vlc_fourcc_t ParseFormat (vlc_object_t *obj,
                                  const xcb_xv_image_format_info_t *restrict f)
 {
-    if (f->byte_order != ORDER && f->bpp != 8)
-        return 0; /* Argh! */
-
     switch (f->type)
     {
       case XCB_XV_IMAGE_FORMAT_INFO_TYPE_RGB:
@@ -154,10 +151,14 @@ static vlc_fourcc_t ParseFormat (vlc_object_t *obj,
                     return VLC_CODEC_RGB24;
                 break;
               case 16:
+                if (f->byte_order != ORDER)
+                    return 0; /* Mixed endian! */
                 if (f->bpp == 16 && f->depth == 16)
                     return VLC_CODEC_RGB16;
                 break;
               case 15:
+                if (f->byte_order != ORDER)
+                    return 0; /* Mixed endian! */
                 if (f->bpp == 16 && f->depth == 16)
                     return VLC_CODEC_RGBT;
                 if (f->bpp == 16 && f->depth == 15)

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to