1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 08:12:17 +00:00

vo_xv: avoid setting background color due to resize flicker

Set background color only when using ck-method=background. In the
other cases clearing of the non-video image area should be done
manually. Not drawing on the video image area prevents flickering
(visible when resizing).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33522 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
iive 2011-05-29 22:46:52 +00:00 committed by Uoti Urpala
parent e00b1d7f7f
commit 15513a77fb

View File

@ -252,11 +252,12 @@ static int config(struct vo *vo, uint32_t width, uint32_t height,
depth = 24; depth = 24;
XMatchVisualInfo(x11->display, x11->screen, depth, TrueColor, &vinfo); XMatchVisualInfo(x11->display, x11->screen, depth, TrueColor, &vinfo);
xswa.background_pixel = 0;
if (x11->xv_ck_info.method == CK_METHOD_BACKGROUND)
xswa.background_pixel = x11->xv_colorkey;
xswa.border_pixel = 0; xswa.border_pixel = 0;
xswamask = CWBackPixel | CWBorderPixel; xswamask = CWBorderPixel;
if (x11->xv_ck_info.method == CK_METHOD_BACKGROUND) {
xswa.background_pixel = x11->xv_colorkey;
xswamask |= CWBackPixel;
}
vo_x11_create_vo_window(vo, &vinfo, vo->dx, vo->dy, vo->dwidth, vo_x11_create_vo_window(vo, &vinfo, vo->dx, vo->dy, vo->dwidth,
vo->dheight, flags, CopyFromParent, "xv", vo->dheight, flags, CopyFromParent, "xv",