Commit fe249249 authored by Rémi Denis-Courmont's avatar 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.
(cherry picked from commit aa1d564909d15463bab3f737269633fb39820fab)

Conflicts:

	modules/video_output/xcb/xvideo.c
parent 200e74d7
...@@ -134,9 +134,6 @@ static bool CheckXVideo (vout_display_t *vd, xcb_connection_t *conn) ...@@ -134,9 +134,6 @@ static bool CheckXVideo (vout_display_t *vd, xcb_connection_t *conn)
static vlc_fourcc_t ParseFormat (vout_display_t *vd, static vlc_fourcc_t ParseFormat (vout_display_t *vd,
const xcb_xv_image_format_info_t *restrict f) const xcb_xv_image_format_info_t *restrict f)
{ {
if (f->byte_order != ORDER && f->bpp != 8)
return 0; /* Argh! */
switch (f->type) switch (f->type)
{ {
case XCB_XV_IMAGE_FORMAT_INFO_TYPE_RGB: case XCB_XV_IMAGE_FORMAT_INFO_TYPE_RGB:
...@@ -156,6 +153,8 @@ static vlc_fourcc_t ParseFormat (vout_display_t *vd, ...@@ -156,6 +153,8 @@ static vlc_fourcc_t ParseFormat (vout_display_t *vd,
return VLC_CODEC_RGB24; return VLC_CODEC_RGB24;
break; break;
case 16: case 16:
if (f->byte_order != ORDER)
return 0; /* Mixed endian! */
if (f->depth == 16) if (f->depth == 16)
return VLC_CODEC_RGB16; return VLC_CODEC_RGB16;
if (f->depth == 15) if (f->depth == 15)
......
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