[vlc-devel] commit: Used YUV fallback list in xcb. (Laurent Aimar )

git version control git at videolan.org
Sun Aug 9 01:42:28 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Aug  9 01:35:36 2009 +0200| [a298057c367871989a3fda596421ad3fa8bdbd40] | committer: Laurent Aimar 

Used YUV fallback list in xcb.

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

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

diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 75ce2a5..026d9a7 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -346,14 +346,20 @@ static int Open (vlc_object_t *obj)
 
         const xcb_xv_image_format_info_t *xfmt;
 
-        /* Video chroma in preference order */
-        const vlc_fourcc_t chromas[] = {
+        /* */
+        const vlc_fourcc_t chromas_default[] = {
             fmt.i_chroma,
             VLC_CODEC_YUYV,
             VLC_CODEC_RGB24,
             VLC_CODEC_RGB15,
+            0
         };
-        for (size_t i = 0; i < sizeof (chromas) / sizeof (chromas[0]); i++)
+        if (vlc_fourcc_IsYUV (fmt.i_chroma))
+            chromas = vlc_fourcc_GetYUVFallback (fmt.i_chroma);
+        else
+            chromas = chromas_default;
+
+        for (size_t i = 0; chromas[i]; i++)
         {
             vlc_fourcc_t chroma = chromas[i];
             xfmt = FindFormat (vd, chroma, &fmt, a->base_id, r, &p_sys->att);




More information about the vlc-devel mailing list