From bbb2578b4df3e3cd54de995f29df684e2f49a647 Mon Sep 17 00:00:00 2001 Date: Mon, 22 Oct 2018 14:06:13 +0300 Subject: [PATCH] Add option for building vo_x11_clearwindow_part in Xv (bug 108260) --- configure | 11 +++++++++++ libvo/vo_xv.c | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/configure b/configure index c95f611..aed01c1 100755 --- a/configure +++ b/configure @@ -601,6 +601,7 @@ Advanced options: --enable-relocatable enable compiling as relocatable/PIE executable [auto] --enable-crash-debug enable automatic gdb attach on crash [disable] --enable-dynamic-plugins enable dynamic A/V plugins [disable] + --disable-xv-clearwindow disable clear window borders for xv [enable] Use these options if autodetection fails: --extra-cflags=FLAGS extra CFLAGS @@ -901,6 +902,7 @@ def_path_max_check="#define CONFIG_PATH_MAX_CHECK 0" def_priority="#undef CONFIG_PRIORITY" def_pthread_cache="#undef PTHREAD_CACHE" shmem=no +_xv_clearwindow=yes option_value(){ echo $(echo $* | cut -d '=' -f 2-) @@ -1496,6 +1498,8 @@ for ac_option do --enable-mmx) _mmx=yes ;; --disable-mmx) # 3DNow! and MMX2 require MMX _3dnow=no _3dnowext=no _mmx=no _mmxext=no ;; + --enable-xv-clearwindow) _xv_clearwindow=yes ;; + --disable-xv-clearwindow) _xv_clearwindow=no ;; # Handle these options in a second pass. --*-decoder=*|--*-encoder=*|--*-parser=*|--*-protocol=*|--*-demuxer=*|--*-muxer=*|--*-filter=*) ;; @@ -4753,9 +4757,15 @@ if test "$_xv" = yes ; then def_xv='#define CONFIG_XV 1' libs_mplayer="$libs_mplayer -lXv" vomodules="xv $vomodules" + if test "$_xv_clearwindow" = yes ; then + def_xv_clearwindow='#define XV_CLEARWINDOW 1' + else + def_xv_clearwindow='#undef XV_CLEARWINDOW' + fi else def_xv='#undef CONFIG_XV' novomodules="xv $novomodules" + def_xv_clearwindow='#undef XV_CLEARWINDOW' fi echores "$_xv" @@ -9191,6 +9201,7 @@ $def_xinerama $def_xmga $def_xss $def_xv +$def_xv_clearwindow $def_xvmc $def_xvr100 $def_yuv4mpeg diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 05c6747..f4146f2 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -139,7 +139,9 @@ static void deallocate_xvimage(int foo); static void resize(void) { calc_src_dst_rects(image_width, image_height, &src_rect, &dst_rect, NULL, NULL); - //vo_x11_clearwindow_part(mDisplay, vo_window, dst_rect.width, dst_rect.height, vo_fs); +#ifdef XV_CLEARWINDOW + vo_x11_clearwindow_part(mDisplay, vo_window, dst_rect.width, dst_rect.height, vo_fs); +#endif vo_xv_draw_colorkey(dst_rect.left, dst_rect.top, dst_rect.width, dst_rect.height); } -- 2.16.4