From: Gildas Bazin Date: Sun, 19 Dec 2004 19:49:10 +0000 (+0000) Subject: * modules/video_output/x11/xcommon.c: fixed nasty bug with YV12 xvideo output (fixes... X-Git-Tag: 0.8.2~1439 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=2a2caf4de657bb6bf40a552588dc70e6c30f9682;p=vlc * modules/video_output/x11/xcommon.c: fixed nasty bug with YV12 xvideo output (fixes problem with unichrome driver). --- diff --git a/modules/video_output/x11/xcommon.c b/modules/video_output/x11/xcommon.c index b4cb892b12..85c89def15 100644 --- a/modules/video_output/x11/xcommon.c +++ b/modules/video_output/x11/xcommon.c @@ -431,6 +431,13 @@ static int InitVideo( vout_thread_t *p_vout ) I_OUTPUTPICTURES++; } + if( p_vout->output.i_chroma == VLC_FOURCC('Y','V','1','2') ) + { + /* U and V inverted compared to I420 + * Fixme: this should be handled by the vout core */ + p_vout->output.i_chroma = VLC_FOURCC('I','4','2','0'); + } + return VLC_SUCCESS; } @@ -1238,7 +1245,6 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic ) { /* U and V inverted compared to I420 * Fixme: this should be handled by the vout core */ - p_vout->output.i_chroma = VLC_FOURCC('I','4','2','0'); p_pic->U_PIXELS = p_pic->p_sys->p_image->data + p_pic->p_sys->p_image->offsets[2]; p_pic->V_PIXELS = p_pic->p_sys->p_image->data